soundscapecode.soundtrap.open_wav
- soundscapecode.soundtrap.open_wav(input_file: str, channel: int = None, trim_start: int = 0, length: int = -1, soundtrap: int = None, normalise: bool = True) tuple
Open a wave file
Parameters
- input_file:
file to open
- channel:int
channel to use in a multi-channel file. Defaults to None, which uses channel 1
- trim_start: int
cut the start of a file (in seconds)
- length: int
length of the signal to keep (in seconds). Defaults to -1, which keeps the whole file
- soundtrap: int or str
soundtrap ID for calibration. if int, retrieves the data from the OceanInstruments website. if str, loads the data from file
Returns
- tuple
(fs, signal) where fs is the sampling frequency and signal is the loaded sound