Hey, getting no audio frames were pushed (retryabl...
# agents
p
Hey, getting no audio frames were pushed (retryable=True) while using azure TTS. This is breaking when using latest livekit version i.e 1.2.7, but working in the previous 1.1 versions. Am I missing something?
r
Do you get errors in your logs. Or what do you mean but "breaking"?
p
Copy code
interview-agent/venv_v2/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 241, in _main_task
    raise APIError("no audio frames were pushed")
livekit.agents._exceptions.APIError: no audio frames were pushed (body=None, retryable=True) {"pid": 71401, "job_id": "AJ_GMTFjXUHrE57"}
is the error logs. TTS is working fine with older livekit version. No code changes though.
r
We just tried it an it worked. What do you get for
pip freeze |grep livekit
?
p
Copy code
livekit==1.0.12
livekit-agents==1.2.7
livekit-api==1.0.5
livekit-blingfire==1.0.0
livekit-plugins-azure==1.2.7
livekit-plugins-cartesia==1.2.7
livekit-plugins-deepgram==1.2.7
livekit-plugins-elevenlabs==1.2.7
livekit-plugins-noise-cancellation==0.2.5
livekit-plugins-openai==1.2.7
livekit-plugins-silero==1.2.7
livekit-plugins-turn-detector==1.2.7
livekit-protocol==1.0.5
here it is
sorry for the late reply though
@refined-appointment-81829 any updates on this?
Copy code
from livekit.agents.tts import TTS
from livekit.plugins import azure, openai
# from livekit.plugins.turn_detector.english import EnglishModel
# from livekit.agents.voice.room_io import RoomInputOptions
from livekit.agents import Agent, AgentSession, ChatContent, JobContext, JobProcess, WorkerOptions, cli, ModelSettings, llm, FunctionTool, function_tool, get_job_context, _exceptions as livekit_exceptions
# from livekit.rtc import Participant, TrackPublication, Track
# from livekit.protocol.room import SendDataRequest
# from livekit.protocol.models import DataPacket
from livekit.agents.voice import UserStateChangedEvent, AgentStateChangedEvent

from dotenv import load_dotenv

load_dotenv(".env")

class IntroductionAgent(Agent):
    def __init__(self) -> None:
        super().__init__(
            instructions="You are a helpful assistant.",
            tts=azure.TTS(
                voice="en-IN-KavyaNeural"
            ),
            stt=azure.STT(),
            llm=openai.LLM.with_azure(
                azure_deployment="gpt-4o"
            )
        )

    async def on_enter(self) -> None:
        await self.session.generate_reply(instructions="Ask for permission to record the call for quality assurance purposes.")


async def entrypoint(ctx: JobContext):
    await ctx.connect()
    await ctx.wait_for_participant()

    session = AgentSession()
    agent = IntroductionAgent()

    await session.start(agent = agent, room=ctx.room)

if __name__ == "__main__":
    cli.run_app(
        WorkerOptions(
            agent_name="test-agent",
            entrypoint_fnc=entrypoint,
            shutdown_process_timeout=5
        )
    )
simple setup.
Copy code
2025-08-31 21:40:24,134 - DEBUG livekit.agents - http_session(): creating a new httpclient ctx {"pid": 65962, "job_id": "AJ_Bxcm6WBPAngj"}
2025-08-31 21:40:24,514 - WARNING livekit.agents - failed to synthesize speech, retrying in 0.1s
Traceback (most recent call last):
  File "/Users/harishrt/Documents/pagaar/interview-agent/new/venv_v2/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 241, in _main_task
    raise APIError("no audio frames were pushed")
livekit.agents._exceptions.APIError: no audio frames were pushed (body=None, retryable=True) {"tts": "livekit.plugins.azure.tts.TTS", "attempt": 1, "streamed": false, "pid": 65962, "job_id": "AJ_Bxcm6WBPAngj"}
2025-08-31 21:40:24,673 - WARNING livekit.agents - failed to synthesize speech, retrying in 2.0s
Traceback (most recent call last):
  File "/Users/harishrt/Documents/pagaar/interview-agent/new/venv_v2/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 241, in _main_task
    raise APIError("no audio frames were pushed")
livekit.agents._exceptions.APIError: no audio frames were pushed (body=None, retryable=True) {"tts": "livekit.plugins.azure.tts.TTS", "attempt": 2, "streamed": false, "pid": 65962, "job_id": "AJ_Bxcm6WBPAngj"}
2025-08-31 21:40:24,999 - DEBUG livekit.agents - start reading stream {"participant": "d04e91f2-c5bd-4afc62a235d11b7_HTZI-YBB_175222006283", "source": "SOURCE_MICROPHONE", "pid": 65962, "job_id": "AJ_Bxcm6WBPAngj"}
2025-08-31 21:40:26,739 - WARNING livekit.agents - failed to synthesize speech, retrying in 2.0s
Traceback (most recent call last):
  File "/Users/harishrt/Documents/pagaar/interview-agent/new/venv_v2/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 241, in _main_task
Can you pls here as we are stuck for some time.
e
Hey @refined-appointment-81829, found a github issue with the same problem but they faced it for eleven labs tts. link: https://github.com/livekit/agents/issues/3248
p
Just found out this: Tried downgrading to multiple versions step by step. https://github.com/livekit/agents/releases/tag/livekit-agents%401.1.0 Post this release azure TTS is not working. Versions prior to this is working fine.
even cartesia is giving same error