Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/baidu-research/ba-dls-deepspeech
/ functions
Functions
40 in github.com/baidu-research/ba-dls-deepspeech
⨍
Functions
40
◇
Types & classes
1
↓ 4 callers
Method
load_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 callers
Method
featurize
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 callers
Method
fit_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 callers
Method
iterate
(self, audio_paths, texts, minibatch_size, max_iters=None)
data_generator.py:155
↓ 3 callers
Method
load_train_data
(self, desc_file)
data_generator.py:100
↓ 2 callers
Function
argmax_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 callers
Function
compile_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 callers
Function
conv_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 callers
Function
load_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 callers
Function
save_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 callers
Function
validation
Validation routine for speech-models Params: model (keras.model): Constructed keras model val_fn (theano.function): A theano func
train.py:19
↓ 1 callers
Function
atoi
(text)
utils.py:164
↓ 1 callers
Function
calc_feat_dim
(window, max_freq)
utils.py:15
↓ 1 callers
Function
compile_gru_model
Build a recurrent network (CTC) for speech with GRU units
model.py:97
↓ 1 callers
Function
compile_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 callers
Function
compile_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 callers
Function
configure_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 callers
Function
graph
Plot the training and validation costs over iterations Params: dirs (list(str)): Directories where the model and costs are saved
plot.py:36
↓ 1 callers
Method
iterate_test
(self, minibatch_size=16)
data_generator.py:199
↓ 1 callers
Method
iterate_train
(self, minibatch_size=16, sort_by_duration=False, shuffle=True)
data_generator.py:181
↓ 1 callers
Method
iterate_validation
(self, minibatch_size=16)
data_generator.py:203
↓ 1 callers
Method
load_test_data
(self, desc_file)
data_generator.py:103
↓ 1 callers
Method
load_validation_data
(self, desc_file)
data_generator.py:106
↓ 1 callers
Function
main
(train_desc_file, val_desc_file, epochs, save_dir, sortagrad)
train.py:106
↓ 1 callers
Function
main
(test_desc_file, train_desc_file, load_dir)
test.py:54
↓ 1 callers
Function
main
(data_directory, output_file)
create_desc_json.py:19
↓ 1 callers
Function
main
()
visualize.py:58
↓ 1 callers
Method
normalize
(self, feature, eps=1e-14)
data_generator.py:113
↓ 1 callers
Function
parse_args
()
plot.py:27
↓ 1 callers
Function
softmax
(x)
visualize.py:19
↓ 1 callers
Method
sort_by_duration
(durations, audio_paths, texts)
data_generator.py:110
↓ 1 callers
Function
spectrogram
Compute the spectrogram for a real signal. The parameters follow the naming convention of matplotlib.mlab.specgram Args: sam
utils.py:42
↓ 1 callers
Function
spectrogram_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 callers
Function
test
Testing routine for speech-models Params: model (keras.model): Constructed keras model test_fn (theano.function): A theano functi
test.py:14
↓ 1 callers
Function
text_to_int_sequence
Use a character map and convert text to an integer sequence
utils.py:209
↓ 1 callers
Function
train
Main training routine for speech-models Params: model (keras.model): Constructed keras model train_fn (theano.function): A theano
train.py:51
↓ 1 callers
Function
visualize
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
Function
natural_keys
(text)
utils.py:167
Method
prepare_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