Skip to content

Commit

Permalink
Merge pull request #2 from yassineselmi/yassineselmi-patch-1
Browse files Browse the repository at this point in the history
Fixed bytes and str concatenation
  • Loading branch information
yassineselmi authored Oct 30, 2022
2 parents 1bb6657 + eb102e6 commit 1a42801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/azure_tts/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def get_tts_audio(self, message, language, options=None):
prosody.set('pitch', self._pitch)
prosody.set('contour', self._contour)

_LOGGER.debug("Azure TTS - Request body: "+ ElementTree.tostring(body))
_LOGGER.debug(ElementTree.tostring(body))

response = requests.post(endpoint, ElementTree.tostring(body), headers=headers)

Expand All @@ -414,4 +414,4 @@ def get_tts_audio(self, message, language, options=None):
except Exception as e:
_LOGGER.error("Error occurred for Azure TTS: %s", e)
return (None, None)
return ("mp3", data)
return ("mp3", data)

0 comments on commit 1a42801

Please sign in to comment.