Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/boozyguo/ClearWave
/ functions
Functions
37 in github.com/boozyguo/ClearWave
⨍
Functions
37
◇
Types & classes
1
↓ 6 callers
Function
create_folder
(fd)
prepare_data.py:25
↓ 4 callers
Function
calc_sp
Calculate spectrogram. Args: audio: 1darray. mode: string, 'magnitude' | 'complex' Returns: spectrogram: 2darray
prepare_data.py:338
↓ 4 callers
Function
eval
Validation function. Args: model: keras model. gen: object, data generator. x: 3darray, input, (n_segs, n_concat, n_freq
main_dnn.py:29
↓ 3 callers
Function
read_audio
(path, target_fs=None)
prepare_data.py:29
↓ 2 callers
Function
calculate_pesq
Calculate PESQ of all enhaced speech. Args: workspace: str, path of workspace. speech_dir: str, path of clean speech. te
evaluate.py:88
↓ 2 callers
Function
deframesig
Does overlap-add procedure to undo the action of framesig. Ref: From https://github.com/jameslyons/python_speech_features :param frames:
spectrogram_to_wave.py:85
↓ 2 callers
Method
generate
(self, xs, ys)
data_generator.py:10
↓ 2 callers
Function
half_to_whole
Recover whole spectrogram from half spectrogram.
spectrogram_to_wave.py:57
↓ 2 callers
Function
ifft_to_wav
Recover wav from whole spectrogram
spectrogram_to_wave.py:62
↓ 2 callers
Function
log_sp
(x)
prepare_data.py:451
↓ 2 callers
Function
mat_2d_to_3d
Segment 2D array to 3D segments.
prepare_data.py:454
↓ 2 callers
Function
pad_or_trunc
(s, wav_len)
spectrogram_to_wave.py:66
↓ 2 callers
Function
pad_with_border
Pad the begin and finish of spectrogram with border frame value.
prepare_data.py:471
↓ 2 callers
Function
rms
Root mean square.
prepare_data.py:295
↓ 2 callers
Function
round_half_up
(number)
spectrogram_to_wave.py:118
↓ 2 callers
Function
write_audio
(path, audio, sample_rate)
prepare_data.py:40
↓ 1 callers
Function
additive_mixing
Mix normalized source1 and source2. Args: s: ndarray, source1. n: ndarray, source2. Returns: mix_audio: ndarr
prepare_data.py:317
↓ 1 callers
Function
calculate_mixture_features
Calculate spectrogram for mixed, speech and noise audio. Then write the features to disk. Args: workspace: str, path of workspace
prepare_data.py:125
↓ 1 callers
Function
calculate_noisy_features
Calculate spectrogram for mixed, speech and noise audio. Then write the features to disk. Args: workspace: str, path of workspace.
prepare_data.py:232
↓ 1 callers
Function
calculate_noisy_pesq
Calculate PESQ of all enhaced speech. Args: workspace: str, path of workspace. speech_dir: str, path of clean speech. te_snr: f
evaluate.py:55
↓ 1 callers
Function
compute_scaler
Compute and write out scaler of data.
prepare_data.py:478
↓ 1 callers
Function
create_mixture_csv
Create csv containing mixture information. Each line in the .csv file contains [speech_name, noise_name, noise_onset, noise_offset] Args
prepare_data.py:44
↓ 1 callers
Function
get_amplitude_scaling_factor
Given s and n, return the scaler s according to the snr. Args: s: ndarray, source1. n: ndarray, source2. snr: float, SNR
prepare_data.py:300
↓ 1 callers
Function
get_stats
Calculate stats of PESQ.
evaluate.py:120
↓ 1 callers
Function
inference
Inference all test data, write out recovered wavs to disk. Args: workspace: str, path of workspace. tr_snr: float, training SNR
main_dnn.py:218
↓ 1 callers
Function
pack_features
Load all features, apply log and conver to 3D tensor, write out to .h5 file. Args: workspace: str, path of workspace. data_type
prepare_data.py:369
↓ 1 callers
Function
plot_training_stat
Plot training and testing loss. Args: workspace: str, path of workspace. tr_snr: float, training SNR. bgn_iter: int, pl
evaluate.py:15
↓ 1 callers
Function
real_to_complex
Recover pred spectrogram's phase from ground truth's phase. Args: pd_abs_x: 2d array, (n_time, n_freq) gt_x: 2d complex array, (
spectrogram_to_wave.py:43
↓ 1 callers
Function
recover_wav
Recover wave from spectrogram. If you are using scipy.signal.spectrogram, you may need to multipy a scaler to the recovered audio after using
spectrogram_to_wave.py:11
↓ 1 callers
Function
train
Train the neural network. Write out model every several iterations. Args: workspace: str, path of workspace. tr_snr: float, tra
main_dnn.py:60
Method
__init__
(self, batch_size, type, te_max_iter=None)
data_generator.py:4
Function
inverse_scale_on_2d
Inverse scale 2D array data.
prepare_data.py:521
Function
load_hdf5
Load hdf5 data.
prepare_data.py:527
Function
np_mean_absolute_error
(y_true, y_pred)
prepare_data.py:537
Function
recover_gt_wav
Recover ground truth wav.
spectrogram_to_wave.py:73
Function
scale_on_2d
Scale 2D array data.
prepare_data.py:507
Function
scale_on_3d
Scale 3D array data.
prepare_data.py:512