Skip to content

use_tts_aligned_transcript is enabled but no agent transcript was returned from tts #3667

Description

@DeoLeung

I enable use_tts_aligned_transcript

and my tts actually do

if words := info['words']:
  timed_words: list[TimedString] = []
  for word in words:
    timed_words.append(
      TimedString(
        word['word'],
        start_time=word['startTime'],
        end_time=word['endTime'],
      )
    )
  output_emitter.push_timed_transcript(timed_words)

i overwrite the transcription_node and do see the TimedString chunk, but i still got the warning, the only thing i can think of is for the first sentence audio comes first before the timed words

sentence start -> audio chunks -> sentence end(timed words) -> sentence start -> ...

my question is, in this case, does use_tts_aligned_transcript helps? will it pick up the timed words once they are available, or just got ignored?

also i octionally got my tts stop at the middle ( from server log i can see it recieved all the audio chunks), so i wonder whether this setting may be the cause


i think the warning may comes from the say i use in tool calls with cached audio bytes

audio_bytes = await ctx.userdata.cache.get(key)
    if audio_bytes is None:
      audio_bytes = await session.tts.synthesize(text, return_bytes=True)
      await ctx.userdata.cache.set(
        key,
        audio_bytes,
      )
    session.say(
      text,
      audio=say_audio(audio_bytes),
      allow_interruptions=allow_interruptions,
      add_to_chat_ctx=False,
    )

so any suggestion about improving the aligment in session.say?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions