Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/__pycache__

/**/Contr*
4 changes: 4 additions & 0 deletions conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ gaussian_kernel_sigma: 1
is_cuda: true
test_batch_size: 4

# Plot
plot_formants: true
plot_spectrogram: true


# model
f1_blocks: 2
Expand Down
7 changes: 7 additions & 0 deletions dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def preemphasis(x, coeff=0.97):

def extract_features(wav_file, hp):
wav, sr = taudio.load(wav_file)
# If SR is not 16kHz, resample
if sr != hp.sample_rate:
print(f"Resampling {wav_file} from {sr} to {hp.sample_rate}")
wav = taudio.transforms.Resample(sr, hp.sample_rate)(wav)
sr = hp.sample_rate

# Pre-emphasis
if hp.emph>0:
wav=preemphasis(wav,coeff=hp.emph)

Expand Down
Binary file added predictions/Tonsill_ses3_speech_0007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading