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