-
Notifications
You must be signed in to change notification settings - Fork 60
MicrosoftTranslate.text_to_speech is not working #81
Description
from translatepy.translators.microsoft import MicrosoftTranslate
t = MicrosoftTranslate()
result = t.text_to_speech("Hello", 65, "male", "eng")
Traceback (most recent call last):
File "D:\Project\Python\translate\123.py", line 3, in
t = MicrosoftTranslate()
File "D:\Project\Python\translate\translatepy\translators\microsoft.py", line 88, in init
self.session_manager = MicrosoftSessionManager(request)
File "D:\Project\Python\translate\translatepy\translators\microsoft.py", line 39, in init
self._parse_authorization_data()
File "D:\Project\Python\translate\translatepy\translators\microsoft.py", line 46, in parse_authorization_data
token_response = self.bing_session.send(url123, data={})
File "D:\Project\Python\translate\translatepy\translators\bing.py", line 106, in send
response = request.json()
File "D:\Project\Python\translate\translatepy\utils\request.py", line 80, in json
return loads(self.text, **kwargs)
File "C:\Users\Виктор\AppData\Local\Programs\Python\Python310\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\Виктор\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Виктор\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Process finished with exit code 1