refactor: switch the whole project to English
talk is going to be published. Code comments, CLI output, error messages,
daemon log lines, MCP descriptions and results, test names and assertions,
README, spec, skill, build scripts and flake are now English. Only the
spoken announcement texts stay bilingual: the wrap result and the test
sentence are German or English depending on the detected language.
Language fallback is now configurable: `lang = "en" | "de"` (env
TALK_LANG, default en) is used when detection cannot tell (numbers, single
words, ties) and for talk's own announcements. langdetect.Detect takes the
fallback as an argument instead of hard-coding German. `talk setup` asks for
it; `talk doctor` and `talk status` show it.
Vocabulary pinned across packages so the process-boundary tests observe
stable strings: chain log lines ("chain: tier X skipped (not available)",
"falling back to the next tier", "spoken via X"), queue lines ("discarded:
quiet hours ... active", "replaced by toast", "max_age"), CLI notes
("speaking directly", "daemon started at", "no daemon", "nothing to cancel"),
status block with aligned English labels, MCP messages, origin guard 403.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
4d30bd95ad
commit
85fa64cfe6
95 files changed
+4707
-4854
No files matched your search
+21
-22
@@ -2,28 +2,27 @@ package provider
|
||||
|
||||
import "sort"
|
||||
|
||||
// voiceDefaults sind die neutralen Repo-Defaults je Provider und Sprache
|
||||
// (Teil des öffentlichen Vertrags: `talk voices` aus Task 08 listet sie,
|
||||
// überschrieben werden sie durch voice.<provider>.<lang> in der config.toml
|
||||
// oder das CLI-Flag --voice).
|
||||
// voiceDefaults are the neutral repo defaults per provider and language
|
||||
// (part of the public contract: `talk voices` lists them; they are
|
||||
// overridden by voice.<provider>.<lang> in config.toml or the CLI flag
|
||||
// --voice).
|
||||
//
|
||||
// Entscheidungsnotiz ElevenLabs-Stimme: Spec und Plan führen die persönliche
|
||||
// Stimme KXxZd16DiBqt82nbarJx ausdrücklich als PRIVATEN Default des Nutzers
|
||||
// („nicht Repo-Default", Spec Further Notes); der Repo-Default ist deshalb
|
||||
// die neutrale, mehrsprachige Standardstimme „Rachel" (21m00Tcm4TlvDq8ikWAM
|
||||
// aus dem öffentlichen ElevenLabs-Katalog). Die persönliche Stimme gehört in
|
||||
// die eigene config.toml:
|
||||
// Decision note on the ElevenLabs voice: spec and plan explicitly treat the
|
||||
// personal voice KXxZd16DiBqt82nbarJx as the user's PRIVATE default ("not a
|
||||
// repo default", spec Further Notes); the repo default is therefore the
|
||||
// neutral, multilingual standard voice "Rachel" (21m00Tcm4TlvDq8ikWAM from
|
||||
// the public ElevenLabs catalog). The personal voice belongs in one's own
|
||||
// config.toml:
|
||||
//
|
||||
// [voice.elevenlabs]
|
||||
// de = "KXxZd16DiBqt82nbarJx"
|
||||
// en = "KXxZd16DiBqt82nbarJx"
|
||||
//
|
||||
// OpenAI „alloy" und die Edge-Neural-Stimmen (de-DE-KatjaNeural,
|
||||
// en-US-AriaNeural) sind die jeweils neutralen Standardstimmen der APIs
|
||||
// (Edge-Stimmen sind im Task-Brief vorgegeben).
|
||||
// OpenAI "alloy" and the Edge neural voices (de-DE-KatjaNeural,
|
||||
// en-US-AriaNeural) are the respective neutral standard voices of the APIs.
|
||||
var voiceDefaults = map[string]map[string]string{
|
||||
"elevenlabs": {
|
||||
"de": "21m00Tcm4TlvDq8ikWAM", // „Rachel", multilingual
|
||||
"de": "21m00Tcm4TlvDq8ikWAM", // "Rachel", multilingual
|
||||
"en": "21m00Tcm4TlvDq8ikWAM",
|
||||
},
|
||||
"openai": {
|
||||
@@ -35,19 +34,19 @@ var voiceDefaults = map[string]map[string]string{
|
||||
"en": "en-US-AriaNeural",
|
||||
},
|
||||
"osbuiltin": {
|
||||
// osbuiltin mappt intern selbst (macOS Anna/Samantha, SAPI-Kultur,
|
||||
// espeak -v <lang>) und kennt keine Voice-IDs — hier nur der
|
||||
// Vollständigkeit wegen dokumentiert.
|
||||
// osbuiltin maps internally on its own (macOS Anna/Samantha, SAPI
|
||||
// culture, espeak -v <lang>) and has no voice IDs; documented here
|
||||
// only for completeness.
|
||||
"de": "",
|
||||
"en": "",
|
||||
},
|
||||
}
|
||||
|
||||
// resolveVoice liefert die Voice-ID für einen Provider und eine Sprache.
|
||||
// Rangfolge: override (CLI-Flag --voice bzw. PinVoice) > Mapping aus der
|
||||
// config.toml > neutrales Repo-Default > en-Default > alphabetisch erstes
|
||||
// Default. Ein leerer Rückgabewert heißt: der Provider kennt für diese
|
||||
// Sprache keine Stimme (osbuiltin) und entscheidet selbst.
|
||||
// resolveVoice returns the voice ID for a provider and a language.
|
||||
// Precedence: override (CLI flag --voice or PinVoice) > mapping from
|
||||
// config.toml > neutral repo default > en default > alphabetically first
|
||||
// default. An empty result means: the provider has no voice for this
|
||||
// language (osbuiltin) and decides on its own.
|
||||
func resolveVoice(name, lang, override string, cfgVoices map[string]string) string {
|
||||
if override != "" {
|
||||
return override
|
||||
|
||||
Reference in new issue
Block a user