首页 > 解决方案 > python module speech_recognition recognized only first 5 seconds

问题描述

guys, i have a problem with speech recognition on python3.x I using module speech_recognition. My .wav file have length 5 minutes, however python recognized only first 5 seconds of this file. I have never worked with this module. Please, help me

My code

import speech_recognition as sr

r = sr.Recognizer()
with sr.AudioFile(r"C:\Users\User\Downloads\Unlocking.wav") as source:
    audio = r.record(source)
text = r.recognize_google(audio)
print(text)

标签: pythonpython-3.xspeech-recognitionwavspeech-to-text

解决方案


推荐阅读