用科技協助原文字幕製作

一言以蔽之就是 speech recognition + force alignment。 XD

Speech recognition 的部分試過幾個還是以 Google Cloud Speech API 最好,不過如果訴求是簡單、不想申請帳號、懶得建環境、寫程式又不太在意錯誤率的話,可以用 IBM 的 Speech to Text Demo 頂著。

把影片的音軌或是音檔用 FFmpeg 轉成 FLAC 格式,就可以送上去。

ffmpeg -i input.mp4 audio.flac

離線版的 speech recognition 有 CMUSphinx 可以用,美中不足的是中文的 model 有點爛(辨識不太準),再來就是要使用者大概要會寫一點程式。

出來的結果把辨識錯誤、標點、斷句修一修之後就可以送到 aeneas 做 force alignment。理論上到這裡就很接近完稿了,大概就是針對語速(單位時間字數)等等的小細節做最後的人工微調。

Posted in Technical.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha loading...