smst.utils.audio module¶
-
smst.utils.audio.play_wav(filename)¶ Plays a wav audio file from system using OS calls.
Parameters: filename – name of file to read
-
smst.utils.audio.read_wav(filename)¶ Reads a sound file and converts it to a normalized floating point array.
Parameters: filename – name of file to read Returns: - fs: sampling rate of file
- x: floating point array
-
smst.utils.audio.write_wav(y, fs, filename)¶ Writes a sound file from an array with the sound and the sampling rate. Creates the directory for the file if it does not exist.
Parameters: - y – floating point array of one dimension
- fs – sampling rate
- filename – name of file to create (can be a path)