Expressive Mode: `speech_steering` always injects an English disfluency line, and that text cannot be customized
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 54/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- ai-infra-agents
Hướng nghiên cứu
Start with steering_instructions() and resolve_expressive_options in livekit/agents/tts/_provider_format.py, then trace how AgentActivity._inject_expressive_instructions adds the rendered text to chat context. Check the existing expressive-mode tests and run the relevant tests before changing behavior. Done means callers can customize steering prose and disfluency text while English defaults and vocabulary filtering remain unchanged.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature Type
Would make my life easier
Feature Description
tts_instructions_template and tts_instructions_append can replace or extend the expressive markup guide. The delivery line that speech_steering injects cannot. It is hardcoded English, and resolve_expressive_options appends it after any custom template.
steering_instructions() in livekit/agents/tts/_provider_format.py renders disfluencies as one of two fixed sentences:
True:Sprinkle in natural fillers (um, uh) and openers (oh, well, so), zero to two per turn, never mechanical.False:No fillers (um, uh). Sound composed and fluent.
DEFAULT_EXPRESSIVE_OPTIONS sets disfluencies=True. resolve_expressive_options merges that default, so the English line is injected whenever expressive mode is on, including expressive=True and a custom tts_instructions_template that never mentions fillers. Omitting {tts.markup.llm_instructions} skips the provider markup block. It does not skip this line. AgentActivity._inject_expressive_instructions then puts the rendered text in the LLM chat context.
That breaks non-English agents. A Japanese agent that wants えっと、あの、まあ、そうですね still sees um, uh and oh, well, so in the same prompt. Models follow the English examples. Setting disfluencies=False does not help if you still want fillers. It only swaps in the other English sentence.
Please make every expressive prompt fragment customizable, the same way the markup guide already is. The disfluency line is the one we need to edit. A language-appropriate filler list should be able to replace um, uh without rewriting LiveKit's tag vocabulary.
Two changes would cover it:
- Stop appending
steering_instructions()unconditionally. Expose that fragment as a placeholder, the way{tts.markup.llm_instructions}works, and append the default only when the caller did not replace the template. A full custom template should be the whole prompt. - Let callers replace the disfluency sentence without replacing the template.
Truecan keep today's English line. A string should replace that line.Falsecan keep the opt-out, but that opt-out string needs the same override, or a string should be the only way to name the fillers.
The bool should keep doing what it does now for vocabulary filtering. On Fish Audio, disfluencies=True also adds English few-shots (Um, uh... really?) inside llm_instructions(). Those already drop out if the template omits {tts.markup.llm_instructions}. If a custom disfluency string is set, those few-shots should not keep teaching um and uh.
The same hook should cover the other hardcoded steering prose. When nonverbal steering removes some sounds, _sound_guidance appends an English Non-verbal sounds: line. pace appends Keep a {pace} overall speaking pace. A caller who replaces the steering fragment should be able to replace those too.
English defaults should stay as they are when no override is set.
Workarounds / Alternatives
tts_instructions_append can contradict the English line. The English line is still in the prompt, and the model often follows um, uh anyway.
Replacing tts_instructions_template, including omitting {tts.markup.llm_instructions}, does not stop the append. resolve_expressive_options concatenates steering_instructions() after the template whenever disfluencies is not None.
Omitting speech_steering does not help. The default sets disfluencies=True, and resolve merges that default.
disfluencies=False still injects English: No fillers (um, uh). Sound composed and fluent.
Additional Context
Seen on livekit-agents 1.8.2. The same strings are in steering_instructions() on main.
Reproduction:
AgentSessionwithinference.TTS(xAItts-1) andexpressiveset.tts_instructions_templateis a Japanese guide. It names えっと、あの、まあ、そうですね and does not include{tts.markup.llm_instructions}.speech_steering={"disfluencies": True, ...}.- Render with
resolve_expressive_options(..., provider_key="xai", default=DEFAULT_EXPRESSIVE_OPTIONS), thenInstructions.render. - The result still contains
fillers (um, uh) and openers (oh, well, so).
Docs describe disfluencies as a bool for "um" and "uh", on by default: Expressive mode. Marker labels should stay English. convert_markup only recognizes that vocabulary. This request is only about the prose that tells the LLM which spoken fillers to use.
Additional Context
No response
- Ngôn ngữ chính
- Python
- Star
- 14.6k
- Fork
- 3.9k
- Merge trung bình
- 3 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 166
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của livekit/agents
-
Agent state stays "speaking" after a realtime reply in sessions without audio outputCó thể đã có người làm @Luke-salinero đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Assistant markup is stripped from chat history when expressive mode is offCó thể đã có người làm @ShivamSharma43 đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docs: openai.LLM vs openai.responses.LLM for HTTP OpenAI-compat hostsCó thể làm lại được @AbarnaaSree đã nhận 49 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
livekit/agents#7022 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Google LLM plugin leaves Gemini thinking tokens out of completion_tokensCó thể đã có người làm @ninglinLiu đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 1 ngày
-
OpenAI realtime: a text user turn queued during a tool-output push deletes the function_call_output from the server conversationCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của livekit/agents
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
TomerAberbach/profiler-md#733 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
its-me-prash/vwgroup-connect-ha#1858 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: client bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Deleting all alarms or timers shows deleted ones until the next update when there are none leftĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
leikoilja/ha-google-home#1107 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Graphify-Labs/graphify#4524 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày