我是Python的新手,正在尝试如何在后台播放声音的情况下,从文件中实时转录音频语音。在
更新:@petezurich Sorry for the bad question. Currently, I can hear the
audio playing in the background. However, I am having trouble getting
Sphinx to transcribe the audio. Is there something wrong with the way
I am passing the audio to Sphinx?
It's constantly outputting "Sphinx error" message.
我正在使用PocketSpinx和Uberi/语音识别库。在
到目前为止,我总结了一下:
#!/usr/bin/env python
# recognitions.py : Transcribe Test from an Audio File
import os
import sys
import time
import wave
import pyaudio
import speech_recognition as sr
import threading
try:
import pocketsphinx
except:
print("PocketSphinx is not installed.")
# import audio file within script folder
from os import path