LoginSignup
0
1

More than 1 year has passed since last update.

【Python】speech recognitionメモ

Last updated at Posted at 2023-03-04

install

pip install speechrecognition

サンプルプログラム

import speech_recognition as sr

r = sr.Recognizer()
with sr.AudioFile('test.wav') as source:
    audio = r.record(source)
text = r.recognize_google(audio, language='ja-JP')
print(text)
  • WAV ファイルを用意する必要あり
  • Windows 標準のサウンドレコーダを使用する場合、拡張子の変更が必要
  • 設定は簡単
  • わりとちゃんと使える
0
1
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
1