Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance: speed up b64 operations #13

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hivemind_mic_sat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import base64
import pybase64
import os.path
from queue import Queue
from typing import Optional, List
Expand Down Expand Up @@ -137,7 +137,7 @@ def handle_speak_b64(self, message: Message):
utt = message.data["utterance"]
audio_file = f"/tmp/{hash_sentence(utt)}.wav"
with open(audio_file, "wb") as f:
f.write(base64.b64decode(b64data))
f.write(pybase64.b64decode(b64data))
LOG.info(f"TTS: {audio_file}")
self.playback.put(audio_file,
listen=message.data.get("listen"),
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
hivemind_bus_client>=0.1.0,<1.0.0
ovos-plugin-manager<1.0.0
ovos-audio<1.0.0
click
click
pybase64
Loading