Skip to content

fix(voice): swap the LLM's "d'accord" for "OK" before the TTS - #82

Merged
rockywuest merged 2 commits into
mainfrom
fix/fr-daccord-ok
Nov 21, 2026
Merged

rockywuest merged 2 commits into
mainfrom
fix/fr-daccord-ok

Conversation

@rockywuest

@rockywuest rockywuest commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

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,E9 clean.

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-latest is now 26.04, where setup-python has no Python 3.9, so the 3.9 job failed before running anything. README promises 3.9+, so the job stays and runs on ubuntu-24.04; 3.10–3.12 keep following ubuntu-latest. Suite also run locally under 3.9 (748 passed).

πŸ€– Generated with Claude Code

rockywuest and others added 2 commits November 21, 2026 12:55
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>
@rockywuest
rockywuest merged commit ecb1418 into main Nov 21, 2026
4 checks passed
@rockywuest
rockywuest deleted the fix/fr-daccord-ok branch November 21, 2026 12:00
@rockywuest rockywuest mentioned this pull request Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant