LoginSignup
0
1

More than 1 year has passed since last update.

Google Speech Recognition 恐るべし

Last updated at Posted at 2021-11-22

ソースコード

#!/usr/bin/env python3

import speech_recognition as sr

r = sr.Recognizer()

with sr.AudioFile("1-01.wav") as source:
  audio = r.record(source)

# text = r.recognize_google(audio, language='ja-JP')
text = r.recognize_google(audio, language='en-US')

print(text)

結果

TOEFL test must word 5,000 1:32 modern physical anthropology a major shift in the approach to physical anthropology occurred with the discovery of genetic principles to Gregor J Mendel had formulated the first laws of heredity 3 he had laid the foundation of the science of genetics for genes are the units within sex cells five the sperm and egg transmitted specific hereditary traits from one generation to the next six characteristics to be discarded in the hereditary process 7 blood types are genetically determined 8 we can trace early migration patterns

補足
パケットキャプチャを覗いたら、google宛にREST APIを叩いていることを確認できた。
キャプチャ.PNG

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