Skip to content

Commit

Permalink
feat/handle_hex_audiodata
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Oct 16, 2023
1 parent 2838a90 commit a732233
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,9 @@ def play_audio(self, filename: str, instant: bool = False):
data = {"uri": filename}
else:
with open(filename, "rb") as f:
data = {"audio_ext": filename.split(".")[-1],
"binary_data": binascii.hexlify(f.read())}
bindata = binascii.hexlify(f.read()).decode('utf-8')
data = {"audio_ext": filename.split(".")[-1],
"binary_data": bindata}

self.bus.emit(message.forward(mtype, data))

Expand Down

0 comments on commit a732233

Please sign in to comment.