【问题标题】:How can I get word-level timestamps in OpenAI's Whisper ASR?如何在 OpenAI 的 Whisper ASR 中获取词级时间戳?
【发布时间】:2022-09-29 20:33:02
【问题描述】:

我使用 OpenAI 的 Whisper python lib 进行语音识别。如何获得字级时间戳?


使用 OpenAI\'s Whisper 转录(在 Ubuntu 20.04 x64 LTS 和 Nvidia GeForce RTX 3090 上测试):

conda create -y --name whisperpy39 python==3.9
conda activate whisperpy39
pip install git+https://github.com/openai/whisper.git 
sudo apt update && sudo apt install ffmpeg
whisper recording.wav
whisper recording.wav --model large

如果使用 Nvidia GeForce RTX 3090,请在 conda activate whisperpy39 之后添加以下内容:

pip install -f https://download.pytorch.org/whl/torch_stable.html
conda install pytorch==1.10.1 torchvision torchaudio cudatoolkit=11.0 -c pytorch
  • 有趣的问题,如果您有时间提供一些当前方法的代码:)

标签: python timestamp speech-recognition openai openai-whisper


【解决方案1】:

https://openai.com/blog/whisper/ 只提到“短语级时间戳”,我从中推断如果不添加更多代码就无法获得单词级时间戳。

From one of the Whisper authors:

不直接支持获取单词级别的时间戳,但可以使用时间戳标记上的预测分布或交叉注意力权重。

https://github.com/jianfch/stable-ts(麻省理工学院许可证):

该脚本修改了 Whisper 模型的方法,无需额外推理即可访问每个单词的预测时间戳记号。它还将时间戳稳定到单词级别以确保年表。

注意:

【讨论】:

    猜你喜欢
    • 2022-10-09
    • 2021-09-26
    • 1970-01-01
    • 2012-10-18
    • 1970-01-01
    • 1970-01-01
    • 2017-09-22
    • 1970-01-01
    • 2013-06-30
    相关资源
    最近更新 更多