0
3

More than 1 year has passed since last update.

Pythonで文字起こし

Posted at

PythonでWavファイル→音声認識

wav fileの中身でなんて喋ってる聞くのがめんどいので、pythonで文字起こししてそのテキストだけみればええやん

v2t.py
import speech_recognition as sr

r = sr.Recognizer()

def v2t(path:str) -> str:
    with sr.AudioFile(path) as source:
        audio = r.record(source)
    return r.recognize_google(audio, language='ja-JP')

おわり.langのところいじれば日本語以外もいける

利用例

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3