final
This commit is contained in:
parent
c728bd3cfd
commit
d910b69e92
|
@ -290,6 +290,8 @@ def speech2text(wsParam):
|
|||
|
||||
if __name__ == "__main__":
|
||||
# 测试时候在此处正确填写相关信息即可运行
|
||||
while 1:
|
||||
global_text=""
|
||||
CHUNK = 512
|
||||
FORMAT = pyaudio.paInt16
|
||||
CHANNELS = 1
|
||||
|
@ -342,6 +344,7 @@ if __name__ == "__main__":
|
|||
wsParam = Ws_Param(APPID='44385032', APISecret='YWNkNTZhMTkwZWFiZjhjNjU4MDg2MzY4',
|
||||
APIKey='83f2198f66ed394e7a73deb57c1c1b44',
|
||||
Text=text)
|
||||
|
||||
websocket.enableTrace(False)
|
||||
wsUrl = wsParam.create_url()
|
||||
ws = websocket.WebSocketApp(
|
||||
|
@ -352,4 +355,6 @@ if __name__ == "__main__":
|
|||
p=vlc.MediaPlayer(file)
|
||||
p.play()
|
||||
input("playing")
|
||||
p.stop()
|
||||
|
||||
#os.system(file)
|
||||
|
|
Loading…
Reference in New Issue