MCPcopy Create free account

hub / github.com/baidu-research/ba-dls-deepspeech / functions

Functions40 in github.com/baidu-research/ba-dls-deepspeech

↓ 4 callersMethodload_metadata_from_desc_file
Read metadata from the description file (possibly takes long, depending on the filesize) Params: desc_file (str): Pa
data_generator.py:53
↓ 3 callersMethodfeaturize
For a given audio clip, calculate the log of its Fourier Transform Params: audio_clip(str): Path to the audio clip
data_generator.py:44
↓ 3 callersMethodfit_train
Estimate the mean and std of the features from the training set Params: k_samples (int): Use this number of samples for estimatio
data_generator.py:207
↓ 3 callersMethoditerate
(self, audio_paths, texts, minibatch_size, max_iters=None)
data_generator.py:155
↓ 3 callersMethodload_train_data
(self, desc_file)
data_generator.py:100
↓ 2 callersFunctionargmax_decode
Decode a prediction using the highest probable character at each timestep. Then, simply convert the integer sequence to text Params:
utils.py:187
↓ 2 callersFunctioncompile_test_fn
Build a testing routine for speech models. Args: model: A keras model (built=True) instance Returns: val_fn (theano.function)
model.py:55
↓ 2 callersFunctionconv_output_length
Compute the length of the output sequence after 1D convolution along time. Note that this function is in line with the function used in
utils.py:19
↓ 2 callersFunctionload_model
Load a model and its weights from a directory Params: load_dir (str): Path the model directory weights_file (str): If this is not
utils.py:155
↓ 2 callersFunctionsave_model
Save the model and costs into a directory Params: save_dir (str): Directory used to store the model model (keras.models.Model)
utils.py:130
↓ 2 callersFunctionvalidation
Validation routine for speech-models Params: model (keras.model): Constructed keras model val_fn (theano.function): A theano func
train.py:19
↓ 1 callersFunctionatoi
(text)
utils.py:164
↓ 1 callersFunctioncalc_feat_dim
(window, max_freq)
utils.py:15
↓ 1 callersFunctioncompile_gru_model
Build a recurrent network (CTC) for speech with GRU units
model.py:97
↓ 1 callersFunctioncompile_output_fn
Build a function that simply calculates the output of a model Args: model: A keras model (built=True) instance Returns: outpu
model.py:79
↓ 1 callersFunctioncompile_train_fn
Build the CTC training routine for speech models. Args: model: A keras model (built=True) instance Returns: train_fn (theano.
model.py:21
↓ 1 callersFunctionconfigure_logging
Setup logging. This configures either a console handler, a file handler, or both and adds them to the root logger. Args: console
utils.py:221
↓ 1 callersFunctiongraph
Plot the training and validation costs over iterations Params: dirs (list(str)): Directories where the model and costs are saved
plot.py:36
↓ 1 callersMethoditerate_test
(self, minibatch_size=16)
data_generator.py:199
↓ 1 callersMethoditerate_train
(self, minibatch_size=16, sort_by_duration=False, shuffle=True)
data_generator.py:181
↓ 1 callersMethoditerate_validation
(self, minibatch_size=16)
data_generator.py:203
↓ 1 callersMethodload_test_data
(self, desc_file)
data_generator.py:103
↓ 1 callersMethodload_validation_data
(self, desc_file)
data_generator.py:106
↓ 1 callersFunctionmain
(train_desc_file, val_desc_file, epochs, save_dir, sortagrad)
train.py:106
↓ 1 callersFunctionmain
(test_desc_file, train_desc_file, load_dir)
test.py:54
↓ 1 callersFunctionmain
(data_directory, output_file)
create_desc_json.py:19
↓ 1 callersFunctionmain
()
visualize.py:58
↓ 1 callersMethodnormalize
(self, feature, eps=1e-14)
data_generator.py:113
↓ 1 callersFunctionparse_args
()
plot.py:27
↓ 1 callersFunctionsoftmax
(x)
visualize.py:19
↓ 1 callersMethodsort_by_duration
(durations, audio_paths, texts)
data_generator.py:110
↓ 1 callersFunctionspectrogram
Compute the spectrogram for a real signal. The parameters follow the naming convention of matplotlib.mlab.specgram Args: sam
utils.py:42
↓ 1 callersFunctionspectrogram_from_file
Calculate the log of linear spectrogram from FFT energy Params: filename (str): Path to the audio file step (int): Step size in m
utils.py:98
↓ 1 callersFunctiontest
Testing routine for speech-models Params: model (keras.model): Constructed keras model test_fn (theano.function): A theano functi
test.py:14
↓ 1 callersFunctiontext_to_int_sequence
Use a character map and convert text to an integer sequence
utils.py:209
↓ 1 callersFunctiontrain
Main training routine for speech-models Params: model (keras.model): Constructed keras model train_fn (theano.function): A theano
train.py:51
↓ 1 callersFunctionvisualize
Get the prediction using the model, and visualize softmax outputs Params: model (keras.models.Model): Trained speech model test_f
visualize.py:23
Method__init__
Params: step (int): Step size in milliseconds between windows window (int): FFT window size in milliseconds
data_generator.py:23
Functionnatural_keys
(text)
utils.py:167
Methodprepare_minibatch
Featurize a minibatch of audio, zero pad them and return a dictionary Params: audio_paths (list(str)): List of paths to audio fil
data_generator.py:116