🚀 Whisper Large v3 for Speech Flow (Fluency) Classification
このモデルは、音声の流暢性を分類する機能を備えており、Vox-Profile: A Speech Foundation Model Benchmark for Characterizing Diverse Speaker and Speech Traits (https://arxiv.org/pdf/2505.14648) で説明されている実装を含んでいます。このモデルは音声の流暢性と不流暢性を分類し、不流暢な音声が検出された場合には不流暢のタイプを予測します。
🚀 クイックスタート
このモデルを使用するには、以下の手順に従ってください。
📦 インストール
リポジトリのダウンロード
git clone git@github.com:tiantiaf0627/vox-profile-release.git
パッケージのインストール
conda create -n vox_profile python=3.8
cd vox-profile-release
pip install -e .
💻 使用例
基本的な使用法
import torch
import torch.nn.functional as F
from src.model.fluency.whisper_fluency import WhisperWrapper
device = torch.device("cuda") if torch.cuda.is_available() else "cpu"
model = WhisperWrapper.from_pretrained("tiantiaf/whisper-large-v3-speech-flow").to(device)
model.eval()
高度な使用法
音声データの準備
audio_data = torch.zeros([1, 16000*10]).float().to(device)
audio_segment = (audio_data.shape[1] - 3*16000) // 16000 + 1
if audio_segment < 1: audio_segment = 1
input_audio = list()
input_audio_length = list()
for idx in range(audio_segment):
input_audio.append(audio_data[0, 16000*idx:16000*idx+3*16000])
input_audio_length.append(torch.tensor(len(audio_data[0, 16000*idx:16000*idx+3*16000])))
input_audio = torch.stack(input_audio, dim=0)
input_audio_length = torch.stack(input_audio_length, dim=0)
予測
fluency_outputs, disfluency_type_outputs = model(input_audio, length=input_audio_length)
fluency_prob = F.softmax(fluency_outputs, dim=1).detach().cpu().numpy().astype(float).tolist()
disfluency_type_prob = nn.Sigmoid()(disfluency_type_outputs)
disfluency_type_predictions = (disfluency_type_prob > 0.7).int().detach().cpu().numpy().tolist()
disfluency_type_prob = disfluency_type_prob.cpu().numpy().astype(float).tolist()
発話の予測結果の収集
utterance_fluency_list = list()
utterance_disfluency_list = list()
for audio_idx in range(audio_segment):
disfluency_type = list()
if fluency_prob[audio_idx][0] > 0.5:
utterance_fluency_list.append("fluent")
else:
utterance_fluency_list.append("disfluent")
predictions = disfluency_type_predictions[audio_idx]
for label_idx in range(len(predictions)):
if predictions[label_idx] == 1:
disfluency_type.append(disfluency_type_labels[label_idx])
utterance_disfluency_list.append(disfluency_type)
print(utterance_fluency_list)
print(utterance_disfluency_list)
📚 ドキュメント
モデルの説明
このモデルは、音声の流暢性を分類するために、3秒のウィンドウサイズと1秒のステップサイズで音声を予測します。予測結果は、以下のカテゴリのいずれかに分類されます。
["fluent", "disfluent"]
不流暢な音声が検出された場合、以下の不流暢タイプを予測します。
[
"Block",
"Prolongation",
"Sound Repetition",
"Word Repetition",
"Interjection"
]
問い合わせ先
何か質問がある場合は、Tiantian Feng (tiantiaf@usc.edu) までご連絡ください。
引用
このモデルを使用する場合や、あなたの研究に役立つと感じた場合は、以下の論文を引用してください。
@article{feng2025vox,
title={Vox-Profile: A Speech Foundation Model Benchmark for Characterizing Diverse Speaker and Speech Traits},
author={Feng, Tiantian and Lee, Jihwan and Xu, Anfeng and Lee, Yoonjeong and Lertpetchpun, Thanathai and Shi, Xuan and Wang, Helin and Thebaud, Thomas and Moro-Velazquez, Laureano and Byrd, Dani and others},
journal={arXiv preprint arXiv:2505.14648},
year={2025}
}
📄 ライセンス
このモデルは、Apache 2.0ライセンスの下で提供されています。