Merge pull request 'fix: voice AI spells out numbers/dates for TTS' (#5) from fix/voice-number-pronunciation into main
deploy / deploy (push) Successful in 31s
deploy / deploy (push) Successful in 31s
This commit was merged in pull request #5.
This commit is contained in:
@@ -136,7 +136,14 @@ def operator_system_prompt(*, language: str, channel_label: str, is_voice: bool,
|
|||||||
preferred_language = "Kazakh" if str(language or "").strip().lower() == "kz" else "Russian"
|
preferred_language = "Kazakh" if str(language or "").strip().lower() == "kz" else "Russian"
|
||||||
delivery_hint = (
|
delivery_hint = (
|
||||||
"The reply will be spoken aloud over a phone call, so keep it concise, natural, and easy to listen to. "
|
"The reply will be spoken aloud over a phone call, so keep it concise, natural, and easy to listen to. "
|
||||||
"Prefer one or two short sentences and at most one clarifying question."
|
"Prefer one or two short sentences and at most one clarifying question. "
|
||||||
|
"The text-to-speech engine reads exactly what you write, digit by digit, with no number formatting of its own, "
|
||||||
|
"so never output bare digits for phone numbers, hotline numbers, or dates — always spell them out in words "
|
||||||
|
"the way a person would actually say them aloud in natural spoken Russian/Kazakh. "
|
||||||
|
"Short hotline or service numbers (e.g. 1414, 109) must be spelled out the way people say them as a code, "
|
||||||
|
"grouped and read naturally (\"1414\" as \"четырнадцать четырнадцать\", not \"тысяча четыреста четырнадцать\"). "
|
||||||
|
"Calendar dates must use the correct spoken grammatical case (\"25 числа\" as \"двадцать пятого числа\", "
|
||||||
|
"not \"двадцать пять число\"; \"14 марта\" as \"четырнадцатого марта\")."
|
||||||
if is_voice
|
if is_voice
|
||||||
else "The reply should read like a concise message from a live first-line operator."
|
else "The reply should read like a concise message from a live first-line operator."
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user