Jetson 部署 Faster Whisper

打印 上一主题 下一主题

主题 1865|帖子 1865|积分 5595

Whisper

Whisper 是一种通用语音识别模型。它是在大量不同音频数据集上进行训练的,也是一个多使命模型,可以执行多语言语音识别、语音翻译和语言识别。

测试,用Chattts生成一段语音:四川美食确实以辣著名,但也有不辣的选择。比如甜水面、赖汤圆、蛋烘糕、叶儿粑等,这些小吃口味温和,甜而不腻,也很受接待。
  1. $ pip install -U openai-whisper
  2. $ sudo apt update && sudo apt install ffmpeg
  3. $ pip install setuptools-rust
  4. $ whisper ../audio.wav --model tiny
  5. 100%|█████████████████████████████████████| 72.1M/72.1M [00:36<00:00, 2.08MiB/s]
  6. /home/jetson/.local/lib/python3.8/site-packages/whisper/__init__.py:146: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  7.   checkpoint = torch.load(fp, map_location=device)
  8. /home/jetson/.local/lib/python3.8/site-packages/whisper/transcribe.py:115: UserWarning: FP16 is not supported on CPU; using FP32 instead
  9.   warnings.warn("FP16 is not supported on CPU; using FP32 instead")
  10. Detecting language using up to the first 30 seconds. Use `--language` to specify the language
  11. Detected language: Chinese
  12. [00:00.000 --> 00:03.680] 四川美時確實以辣文明 但以有不辣的選擇
  13. [00:03.680 --> 00:07.200] 比如潛水面 賴湯圓 再轟高夜熱八等
  14. [00:07.200 --> 00:11.560] 這些小市口維溫和 然後甜而不膩也很受歡迎
复制代码
这个是CPU运行的

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

半亩花草

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表