Hi,
Aside from the pyscribe tool, im trying to use IBM watson to transcribe using this tutorial
this is the code he used:
from ibm_watson import SpeechToTextV1, LanguageTranslatorV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
ltapikey = 'YOUR LANGUAGE TRANSLATOR APIKEY'
lturl = 'YOUR LANGUAGE TRANSLATOR URL'
sttapikey = 'YOUR STT API KEY'
stturl = 'YOUR STT URL'
ltauthenticator = IAMAuthenticator(ltapikey)
lt = LanguageTranslatorV3(version='2018-05-01', authenticator=ltauthenticator)
lt.set_service_url(lturl)
sttauthenticator = IAMAuthenticator(sttapikey)
stt = SpeechToTextV1(authenticator=sttauthenticator)
stt.set_service_url(stturl)
with open('YOURFILENAME.mp3', 'rb') as f:
res = stt.recognize(audio=f, content_type='audio/mp3', model='en-AU_NarrowbandModel', continuous=True).get_result()
voicetext = res['results'][0]['alternatives'][0]['transcript']
voicetext
greek = 'en-el'
chinese = 'en-zh'
hindi = 'en-hi'
translation = lt.translate(text=voicetext, model_id=hindi).get_result()
translatedtext = translation['translations'][0]['translation']
translatedtext
with open('result.txt', 'w') as f:
f.write(translatedtext)
I get the following error:
TypeError:request() got an unexpect keyword argument 'continous'
Any help would be greatly appreciated
Aside from the pyscribe tool, im trying to use IBM watson to transcribe using this tutorial
this is the code he used:
from ibm_watson import SpeechToTextV1, LanguageTranslatorV3
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
ltapikey = 'YOUR LANGUAGE TRANSLATOR APIKEY'
lturl = 'YOUR LANGUAGE TRANSLATOR URL'
sttapikey = 'YOUR STT API KEY'
stturl = 'YOUR STT URL'
ltauthenticator = IAMAuthenticator(ltapikey)
lt = LanguageTranslatorV3(version='2018-05-01', authenticator=ltauthenticator)
lt.set_service_url(lturl)
sttauthenticator = IAMAuthenticator(sttapikey)
stt = SpeechToTextV1(authenticator=sttauthenticator)
stt.set_service_url(stturl)
with open('YOURFILENAME.mp3', 'rb') as f:
res = stt.recognize(audio=f, content_type='audio/mp3', model='en-AU_NarrowbandModel', continuous=True).get_result()
voicetext = res['results'][0]['alternatives'][0]['transcript']
voicetext
greek = 'en-el'
chinese = 'en-zh'
hindi = 'en-hi'
translation = lt.translate(text=voicetext, model_id=hindi).get_result()
translatedtext = translation['translations'][0]['translation']
translatedtext
with open('result.txt', 'w') as f:
f.write(translatedtext)
I get the following error:
TypeError:request() got an unexpect keyword argument 'continous'
Any help would be greatly appreciated