Repository navigation
fix(voice): swap the LLM's "d'accord" for "OK" before the TTS - #82
Merged
Merged
Conversation
The fixed replies say "OK !" since round five because Vosk hears the dog's own "D'accord !" as 'dakar' β an echo no word match can catch. In chat mode the LLM writes its own sentences and can still pick the word (log 11). echo_safe_speech() replaces it on the way to the TTS, with either apostrophe and in any case. sanitize_speech() keeps its single job (stage directions, markdown) and its existing tests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ubuntu-latest moved to 26.04, where setup-python has no Python 3.9
("The version '3.9' with architecture 'x64' was not found for Ubuntu 26.04").
README still promises 3.9+, so the job stays and runs on 24.04; 3.10-3.12
keep following ubuntu-latest.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #45 (log 11).
Problem. Vosk hears the dog's own "D'accord !" as 'dakar' β an echo that no word match can catch. Round five changed the built-in replies and the prompt examples to "OK !". In chat mode, however, the LLM writes its own sentences and can still choose the word, so 'dakar' kept appearing.
Fix. A small
echo_safe_speech()replaces "d'accord" with "OK" right before the text goes to the TTS β both apostrophe forms ('andβ), any case, whole word only.sanitize_speech()is untouched and keeps its single job.Tests. New
tests/test_field_session_6.py(7 tests); 6 of them fail without the change. Full suite: 745 passed.ruff check . --select F,E9clean.Not verified. Log 11 does not show what the dog actually said at the moment of the 'dakar' (that is in the brain journal, not the voice log). This closes the one known source; if 'dakar' still appears afterwards, the journal will show the sentence.
CI (second commit).
ubuntu-latestis now 26.04, wheresetup-pythonhas no Python 3.9, so the 3.9 job failed before running anything. README promises 3.9+, so the job stays and runs onubuntu-24.04; 3.10β3.12 keep followingubuntu-latest. Suite also run locally under 3.9 (748 passed).π€ Generated with Claude Code