examples: stabilize LiveKit pronunciation with Fish Audio - #2279
examples: stabilize LiveKit pronunciation with Fish Audio#2279rosetta-livekit-bot[bot] wants to merge 1 commit into
Conversation
|
| export const LIVEKIT_PRONUNCIATION = 'Lyve Kit'; | ||
| export const LIVEKITS_PRONUNCIATION = "Lyve Kit's"; | ||
| const LIVEKIT_RE = /\blivekit(?<possessive>['’]s)?\b/gi; | ||
|
|
||
| function replaceLiveKit(match: string, possessive: string | undefined): string { | ||
| return possessive ? LIVEKITS_PRONUNCIATION : LIVEKIT_PRONUNCIATION; | ||
| } |
There was a problem hiding this comment.
🟡 New helper function and exported pronunciation values ship without documentation comments
The newly added replacement helper (replaceLiveKit at examples/src/homepage/filters/pronunciation.ts:10) and the two new exported pronunciation values have no documentation comment, while the value they replaced previously carried one, so the repository's requirement that every new addition be documented is not met.
Impact: Generated API docs lose the explanation of why these spellings exist, making the pronunciation workaround harder to understand later.
Documentation convention from CONTRIBUTING.md
CONTRIBUTING.md states: "If writing new methods/interfaces/enums/classes, document them. This project uses TypeDoc ... and every new addition has to be properly documented." The removed LIVEKIT_IPA had /** Inworld custom pronunciation for the word "LiveKit". */; the new LIVEKIT_PRONUNCIATION, LIVEKITS_PRONUNCIATION, and replaceLiveKit have none.
| export const LIVEKIT_PRONUNCIATION = 'Lyve Kit'; | |
| export const LIVEKITS_PRONUNCIATION = "Lyve Kit's"; | |
| const LIVEKIT_RE = /\blivekit(?<possessive>['’]s)?\b/gi; | |
| function replaceLiveKit(match: string, possessive: string | undefined): string { | |
| return possessive ? LIVEKITS_PRONUNCIATION : LIVEKIT_PRONUNCIATION; | |
| } | |
| /** Fish Audio-friendly spelling for the word "LiveKit". */ | |
| export const LIVEKIT_PRONUNCIATION = 'Lyve Kit'; | |
| /** Fish Audio-friendly spelling for the possessive form of "LiveKit". */ | |
| export const LIVEKITS_PRONUNCIATION = "Lyve Kit's"; | |
| const LIVEKIT_RE = /\blivekit(?<possessive>['’]s)?\b/gi; | |
| /** Pick the plain or possessive pronunciation for a matched "LiveKit" occurrence. */ | |
| function replaceLiveKit(_match: string, possessive: string | undefined): string { | |
| return possessive ? LIVEKITS_PRONUNCIATION : LIVEKIT_PRONUNCIATION; | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
Rosetta port review: livekit/agents#6825 → this PRCompared against the original Python PR ( Verification details (click to expand)Logic equivalence
API compatibility
Worth a look (non-blocking)The sibling transforms in No missing features or behavioral bugs found. Output-stream error handling ( Review effort: low — 3 files, ~40 lines, a direct line-for-line port with one non-blocking stream-handling nit. Generated by Claude Code |
Summary
LiveKitasLyve Kitonly in the Fish Audio TTS streamPorts livekit/agents#6825.
Source diff coverage
examples/homepage/agent.py->examples/src/homepage/agent.ts. Imported the TypeScript transform and added it to the existing JSttsTextTransformsoption with the equivalent built-in markdown and emoji filters.examples/homepage/filters/pronunciation.py->examples/src/homepage/filters/pronunciation.ts. Ported the Fish Audio-friendlyLyve Kitspellings and possessive matching while using the target framework's requiredReadableStreamtransform signature and retaining chunk-boundary buffering.examples/homepage/tests/unit/test_pronunciation.py->examples/src/homepage/tests/unit/pronunciation.test.ts. Ported the updated expected values and both new possessive cases to Vitest.Validation
pnpm buildpasses (40/40 workspace tasks).pnpm exec vitest run --root . examples/src/homepage/tests/unitpasses (9/9 tests).cue-clivoice smoke test passes: the agent reached speaking, LiveKit Inference Fish Audio synthesized 10.655s of audio, the transcript retainedLiveKit, and no framework error was emitted.examples/src/testing/agent_task.test.ts(missingFunctionCallOutputEventafter a task handoff), plus pre-existing async fake-LLM errors.plugins/xai/src/stt.tsandexamples/src/hotel-receptionist/hotel_receptionist.ts; the files in this PR pass ESLint.No changeset is included because only the private, changeset-ignored examples package changed.
Ported from livekit/agents#6825
Original PR description
Fish Audio intermittently ignores phoneme controls and pronounces LiveKit like “live in California.” Use the TTS-only spelling “Lyve Kit” to preserve the intended “live music” sound without changing the LLM response or user-facing transcript.
Addresses MARKT-1004
Initial prompt and agent context
Model: GPT-5.6