-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat:binary handlers #5
Conversation
Warning Rate limit exceeded@github-actions[bot] has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 6 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes introduce a new class Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (3)
hivemind_mic_sat/__init__.py (3)
31-33
: Add docstring to document the prefer_b64 parameter.
The new parameter should be documented to explain its purpose and impact.
def __init__(self, prefer_b64=False):
+ """Initialize HiveMindMicrophoneClient.
+
+ Args:
+ prefer_b64 (bool): If True, TTS responses will use base64 encoding.
+ If False, binary synthesis will be used.
+ """
self.prefer_b64 = prefer_b64
self.hm_bus = HiveMessageBusClient(bin_callbacks=TTSHandler())
87-92
: Enhance logging for better debugging.
The speak handling logic should log which mode is being used.
if self.prefer_b64:
+ LOG.debug("Using base64 audio encoding for TTS")
m = message.reply("speak:b64_audio", message.data)
else:
+ LOG.debug("Using binary synthesis for TTS")
m = message.reply("speak:synth", message.data)
self.hm_bus.emit(HiveMessage(HiveMessageType.BUS, payload=m))
- LOG.debug("Requested TTS audio")
+ LOG.debug(f"Requested TTS audio for: {message.data.get('utterance', 'unknown text')}")
116-116
: Enhance startup logging message.
The startup log could include more diagnostic information.
- LOG.info("Listener Loop Started")
+ LOG.info(f"Listener Loop Started (VAD: {self.vad.__class__.__name__}, "
+ f"Microphone: {self.mic.__class__.__name__}, "
+ f"Sample Rate: {self.mic.sample_rate}Hz)")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- hivemind_mic_sat/init.py (4 hunks)
🔇 Additional comments (2)
hivemind_mic_sat/__init__.py (2)
6-6
: LGTM: Import changes are appropriate.
The addition of BinaryDataCallbacks
import is necessary for the new TTSHandler implementation.
31-33
: Verify integration with related PRs.
This PR is part of a larger change set across multiple repositories. Please ensure the binary handling changes are consistent with:
- hivemind-websocket-client/pull/33
- HiveMind-core/pull/100
- hivemind-listener/pull/1
Also applies to: 87-92
companion to JarbasHiveMind/hivemind-websocket-client#33 and https://github.com/JarbasHiveMind/HiveMind-core/pull/100 and JarbasHiveMind/hivemind-audio-binary-protocol#1
Summary by CodeRabbit
New Features
Improvements