Closed tigermessi closed 2 years ago
`import json from os.path import join, dirname from ibm_watson import SpeechToTextV1 from ibm_watson.websocket import RecognizeCallback, AudioSource import threading from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
authenticator = IAMAuthenticator('key') service = SpeechToTextV1(authenticator=authenticator) service.set_service_url('https')
with open('100190439830211008.mp3', 'rb') as audio_file: print(json.dumps( service.recognize( audio=audio_file, content_type='audio/mp3',
model='zh-CN_NarrowbandModel', word_confidence=True).get_result(), indent=2))`
识别中文语音时的代码,报了503的错误,请问是哪里有误呢
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
`import json from os.path import join, dirname from ibm_watson import SpeechToTextV1 from ibm_watson.websocket import RecognizeCallback, AudioSource import threading from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
authenticator = IAMAuthenticator('key') service = SpeechToTextV1(authenticator=authenticator) service.set_service_url('https')
models = service.list_models().get_result()
print(json.dumps(models, indent=2))
model = service.get_model('en-US_BroadbandModel').get_result()
print(json.dumps(model, indent=2))
with open('100190439830211008.mp3', 'rb') as audio_file: print(json.dumps( service.recognize( audio=audio_file, content_type='audio/mp3',
timestamps=True,
识别中文语音时的代码,报了503的错误,请问是哪里有误呢