2017-10-08 9 views
0

나는 스크립트 그것은 출력Bing 서비스의 SpeechRecognition이 첫 번째 문장 만 인식하는 이유는 무엇입니까?

#!/usr/bin/env python3 

"""Recognize speech using Microsoft Bing Voice Recognition.""" 

import speech_recognition as sr 

from os import path 
AUDIO_FILE = path.join(path.dirname(path.realpath(__file__)), "input.wav") 

# use the audio file as the audio source 
r = sr.Recognizer() 
with sr.AudioFile(AUDIO_FILE) as source: 
    audio = r.record(source) # read the entire audio file 


# Microsoft Bing Voice Recognition API uses keys which are 
# 32-character lowercase hexadecimal strings 
BING_KEY = "FOOBAR - insert your key here" 
try: 
    print("Microsoft Bing Voice Recognition thinks you said:\n\n" + 
      r.recognize_bing(audio, key=BING_KEY, language="de-DE")) 
except sr.UnknownValueError: 
    print("Microsoft Bing Voice Recognition could not understand audio") 
except sr.RequestError as e: 
    print(("Could not request results from Microsoft Bing Voice Recognition " 
      "service; {0}").format(e)) 

the audio of this clip을 전사하는 빙 ASR 서비스와 SpeechRecognition package을 시도 :

Microsoft Bing Voice Recognition thinks you said: 

Reaser Was ist haben sie Lust mit dem Kino zu kommen war schon dass ich könnte den Film gar nicht folgen 

물론, 그것은 노력하고 있지만, 전체 파일을 전사하지 않습니다. 왜? 어떻게하면 전체 파일을 복사 할 수 있습니까?

답변