WhisperD-NL is a fine-tuned Whisper model with disfluencies trained on the Corpus Gesproken Nederlands (CGN).
import torch
import librosa
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("pevers/whisperd-nl")
model = AutoModelForSpeechSeq2Seq.from_pretrained("pevers/whisperd-nl")
audio, sr = librosa.load("test/nl_stutter.mp3", sr=16000)
inputs = processor(audio, sampling_rate=sr, return_tensors="pt")
with torch.no_grad():
predicted_ids = model.generate(inputs.input_features)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False)[0]
print(transcription)
Outputs:
[S1] ja uh d dat is niet zo makkelijk ui uit te leggen uh zeg maar. weet je?
The CGN contains disfluencies and literal transcriptions of more than 900 hours of Dutch audio. More information about the CGN can be found here.
I let Claude run over the folder structure to generate a nice overview of the data. The output can be found in CGN_2.0.3_STRUCTURE.md.
To start a web app and inspect the data, run:
uv run python -m http.server 8000 --bind 0.0.0.0 --directory ../collector/data/CGN_2.0.3/doc_Dutch/
File: test/nl_stutter.mp3
Output of whisper-large-v3:
Ja, dat is niet zo makkelijk uit te leggen, zeg maar, weet je?
Output of WhisperD-NL (large):
[S1] ja uh d dat is niet zo makkelijk ui uit te leggen uh zeg maar. weet je?
It even guessed the short stutter 'd' correctly.
File: test/nl_laughter.mp3
Output of WhisperD-NL (large):
[S1] oké daar moet je me meer over vertellen (laughs). wat een ongemakkelijke lach.
8 commits
WhisperD-NL is a fine-tuned Whisper model with disfluencies trained on the Corpus Gesproken Nederlands (CGN).
import torch
import librosa
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("pevers/whisperd-nl")
model = AutoModelForSpeechSeq2Seq.from_pretrained("pevers/whisperd-nl")
audio, sr = librosa.load("test/nl_stutter.mp3", sr=16000)
inputs = processor(audio, sampling_rate=sr, return_tensors="pt")
with torch.no_grad():
predicted_ids = model.generate(inputs.input_features)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False)[0]
print(transcription)
Outputs:
[S1] ja uh d dat is niet zo makkelijk ui uit te leggen uh zeg maar. weet je?
The CGN contains disfluencies and literal transcriptions of more than 900 hours of Dutch audio. More information about the CGN can be found here.
I let Claude run over the folder structure to generate a nice overview of the data. The output can be found in CGN_2.0.3_STRUCTURE.md.
To start a web app and inspect the data, run:
uv run python -m http.server 8000 --bind 0.0.0.0 --directory ../collector/data/CGN_2.0.3/doc_Dutch/
File: test/nl_stutter.mp3
Output of whisper-large-v3:
Ja, dat is niet zo makkelijk uit te leggen, zeg maar, weet je?
Output of WhisperD-NL (large):
[S1] ja uh d dat is niet zo makkelijk ui uit te leggen uh zeg maar. weet je?
It even guessed the short stutter 'd' correctly.
File: test/nl_laughter.mp3
Output of WhisperD-NL (large):
[S1] oké daar moet je me meer over vertellen (laughs). wat een ongemakkelijke lach.
8 commits
Python
81.6%
HTML
18.4%