Coverage for src/audioio/__init__.py: 100%

29 statements  

« prev     ^ index     » next       coverage.py v7.6.3, created at 2024-10-15 07:29 +0000

1""" 

2Platform independent interfacing of numpy arrays of floats with audio 

3files and devices for scientific data analysis. 

4""" 

5 

6import sys 

7 

8# avoid double inclusion of audioio modules if called as modules, 

9# e.g. python -m src.audioio.audiowriter`: 

10if len(sys.argv) > 0 and sys.argv[0] != '-m': 

11 

12 from .version import __version__ 

13 

14 __all__ = ['audiomodules', 

15 'audioloader', 

16 'audiotools', 

17 'riffmetadata', 

18 'audiometadata', 

19 'audiomarkers', 

20 'audiowriter', 

21 'playaudio'] 

22 

23 # make all important functions available in the audioio namespace: 

24 from .audiomodules import list_modules, installed_modules 

25 from .audiomodules import available_modules, unavailable_modules 

26 from .audiomodules import disable_module, enable_module, select_module 

27 from .audiomodules import missing_modules, missing_modules_instructions 

28 from .audiomodules import installation_instruction 

29 from .bufferedarray import blocks, BufferedArray 

30 from .audioloader import load_audio, AudioLoader 

31 from .audioloader import metadata, markers 

32 from .audiotools import despike, unwrap 

33 from .audiometadata import flatten_metadata, unflatten_metadata 

34 from .audiometadata import write_metadata_text, print_metadata 

35 from .audiometadata import find_key, add_sections 

36 from .audiometadata import set_metadata, add_metadata, move_metadata 

37 from .audiometadata import remove_metadata, cleanup_metadata 

38 from .audiometadata import parse_number, change_unit, get_number 

39 from .audiometadata import get_number_unit, get_int, get_bool 

40 from .audiometadata import get_datetime, update_starttime, get_str 

41 from .audiometadata import get_gain, update_gain, add_unwrap 

42 from .audiometadata import bext_history_str, add_history 

43 from .audiometadata import default_starttime_keys, default_timeref_keys 

44 from .audiometadata import default_gain_keys, default_history_keys 

45 from .audiomarkers import write_markers, print_markers 

46 from .audiowriter import write_audio, available_formats, available_encodings 

47 from .playaudio import play, beep, PlayAudio 

48 from .playaudio import note2freq, fade_in, fade_out, fade