dlpy.audio.AudioTable.create_audio_table¶
-
classmethod
AudioTable.
create_audio_table
(conn, data_path, metadata_path, features_parameters={'feature_scaling_method': 'STANDARDIZATION', 'frame_length': 25, 'frame_shift': 10, 'n_bins': 40, 'n_ceps': 40, 'n_output_frames': 500}, casout=None, task='speech2text')¶ Creates an Audio table and takes care of all the necessary steps
Parameters: - conn : CAS
A connection object to the current session.
- data_path : string
Path to the file that contains the list of audio files (this is expected to be on the server side).
- metadata_path : string
Location to the metadata file (this is expected to be on the client side).
- features_parameters : dict, optional
Parameters to be used while extracting audio features
- casout : string, dict, or CASTable, optional
Resulting output CAS table
- task : string, optional
Specifies the type of the task. Default is speech to text.
Note: currently only support ‘speech2text’ (default)
Returns: - AudioTable
A table containing audio features of audio files as well as their labels. The resulting table can be directly used in the deep learning models.
Raises: - DLPyError
If anything goes wrong at any point in the process of creating this AudioTable, it complains and prints the appropriate message.
Examples
>>> import swat >>> from dlpy.audio import AudioTable >>> s=swat.CAS("cloud.example.com", 5570) >>> aud_table = AudioTable.create_audio_table(s, "/path/to/audio/file.txt", "/metadata/for/audio/file.txt") >>> aud_table.set_connection(s)