Skip to content

fix: resolve code quality and consistency issues in Kokoro TTS connector#2142

Open
Wanbogang wants to merge 4 commits intoOpenMind:mainfrom
Wanbogang:fix/kokoro-tts-connector-issues
Open

fix: resolve code quality and consistency issues in Kokoro TTS connector#2142
Wanbogang wants to merge 4 commits intoOpenMind:mainfrom
Wanbogang:fix/kokoro-tts-connector-issues

Conversation

@Wanbogang
Copy link
Collaborator

Issues Found

  1. Duplicate IOProvider initialization - self.io_provider = IOProvider() called twice
  2. Uninitialized variable - self._zenoh_tts_status_response_pub used before declaration
  3. Inconsistent variable naming - using ai_status_response instead of tts_status_response
  4. Incorrect logging messages - still using "Elevenlabs TTS" instead of "Kokoro TTS"
  5. Missing error handling - zenoh callback methods have no try-catch blocks
  6. Missing null checks - publisher used without validation

Fixes Applied

  • Remove duplicate IOProvider initialization, keep only one instance
  • Add self._zenoh_tts_status_response_pub = None at the beginning of init
  • Change all ai_status_response to tts_status_response
  • Update all log messages to "Kokoro TTS"
  • Add try-catch blocks in zenoh_audio_message() and _zenoh_tts_status_request()
  • Add if self._zenoh_tts_status_response_pub: check before publishing

@Wanbogang Wanbogang requested review from a team as code owners February 6, 2026 14:46
@github-actions github-actions bot added robotics Robotics code changes python Python code tests Test files labels Feb 6, 2026
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant