This model classifies individual 20ms frames of audio based on presence of filled pauses ("eee", "errm", ...).
It was trained on human-annotated Slovenian speech corpus ROG-Artur and achieves F1 of 0.952868 on the test split of the same dataset.
Evaluation on 800 human-annotated instances ParlaSpeech-HR and ParlaSpeech-RS produced the following metrics:
Performance on RS:
Classification report for human vs model on event level:
precision recall f1-score support
0 0.97 0.87 0.92 234
1 0.95 0.99 0.97 542
accuracy 0.95 776
macro avg 0.96 0.93 0.94 776
weighted avg 0.95 0.95 0.95 776
Performance on HR:
Classification report for human vs model on event level:
precision recall f1-score support
0 0.94 0.84 0.89 242
1 0.93 0.98 0.95 531
accuracy 0.93 773
macro avg 0.93 0.91 0.92 773
weighted avg 0.93 0.93 0.93 773
The metrics reported are on event level, which means that if true and
predicted filled pauses at least partially overlap, we count them as a
True Positive event.
Example use:
from transformers import AutoFeatureExtractor, Wav2Vec2BertForAudioFrameClassification
from datasets import Dataset, Audio
import torch
import numpy as np
from pathlib import Path
device = torch.device("cuda")
model_name = "classla/wav2vecbert2-filledPause"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_name)
model = Wav2Vec2BertForAudioFrameClassification.from_pretrained(model_name).to(device)
ds = Dataset.from_dict(
{
"audio": [
"/cache/peterr/mezzanine_resources/filled_pauses/data/dev/Iriss-J-Gvecg-P500001-avd_2082.293_2112.194.wav"
],
}
).cast_column("audio", Audio(sampling_rate=16_000, mono=True))
defevaluator(chunks):
sampling_rate = chunks["audio"][0]["sampling_rate"]
with torch.no_grad():
inputs = feature_extractor(
[i["array"] for i in chunks["audio"]],
return_tensors="pt",
sampling_rate=sampling_rate,
).to(device)
logits = model(**inputs).logits
y_pred = np.array(logits.cpu()).argmax(axis=-1)
return {"y_pred": y_pred.tolist()}
ds = ds.map(evaluator, batched=True)
print(ds["y_pred"][0])
# Returns a list of 20ms frames: [0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,....]# with 0 indicating no filled pause detected in that frame
Citation
Coming soon.
Runs of classla wav2vecbert2-filledPause on huggingface.co
574
Total runs
0
24-hour runs
31
3-day runs
6
7-day runs
-341
30-day runs
More Information About wav2vecbert2-filledPause huggingface.co Model
wav2vecbert2-filledPause huggingface.co is an AI model on huggingface.co that provides wav2vecbert2-filledPause's model effect (), which can be used instantly with this classla wav2vecbert2-filledPause model. huggingface.co supports a free trial of the wav2vecbert2-filledPause model, and also provides paid use of the wav2vecbert2-filledPause. Support call wav2vecbert2-filledPause model through api, including Node.js, Python, http.
wav2vecbert2-filledPause huggingface.co is an online trial and call api platform, which integrates wav2vecbert2-filledPause's modeling effects, including api services, and provides a free online trial of wav2vecbert2-filledPause, you can try wav2vecbert2-filledPause online for free by clicking the link below.
classla wav2vecbert2-filledPause online free url in huggingface.co:
wav2vecbert2-filledPause is an open source model from GitHub that offers a free installation service, and any user can find wav2vecbert2-filledPause on GitHub to install. At the same time, huggingface.co provides the effect of wav2vecbert2-filledPause install, users can directly use wav2vecbert2-filledPause installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
wav2vecbert2-filledPause install url in huggingface.co: