WhisperSpeech是一種反轉Whisper技術,實做的TTS系統。
安裝測試
在 Rocky Linux 8 的 Python 3.11 安裝測試
dnf install python3.11
# 在執行測試時,會需要 python.h,故需要安裝 devel 套件
dnf install python3.11-devel
python3 -m venv /root/venv/whisperspeech
source /root/venv/whisperspeech/bin/activate
pip3 install WhisperSpeech
pip3 install webdataset
測試程式
import torch
import torch.nn.functional as F
from whisperspeech.pipeline import Pipeline
pipe = Pipeline(s2a_ref='collabora/whisperspeech:s2a-q4-tiny-en+pl.model', torch_compile=True)
pipe.generate_to_file("output.wav", "Hello from WhisperSpeech.")
以 time 測試執行時間
time python3 test.py
real 0m38.452s
user 2m19.176s
sys 0m1.683s
真實時間大約花了 40s,這邊是用 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 的機器,沒有用到 GPU
這個網站可以聽到 WhisperSpeech 產生的語音結果
WhisperSpeech - New Text-To-Speech Model In Town