stale-ability-87957
05/12/2025, 5:03 PMtall-airline-16756
05/12/2025, 5:03 PMtall-airline-16756
05/12/2025, 5:04 PMopenai_tts.py
example, follow these steps:
1. Ensure you have the required dependencies installed: livekit-agents>=0.12.20
livekit-plugins-openai>=0.12.3
python-dotenv~=1.0
2. In the script, the connection to the room is managed with the following lines: await job.connect(auto_subscribe=AutoSubscribe.SUBSCRIBE_NONE)
publication = await job.room.local_participant.publish_track(track, options)
await publication.wait_for_subscription()
3. To run the example locally, use the CLI command at the end of the script: if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
This will start the agent, connect to a LiveKit room, and play the text-to-speech audio using OpenAI's TTS service with the "nova" voice.
Sources: Tree View: | dse-workbenchstale-ability-87957
05/12/2025, 5:04 PMtall-airline-16756
05/12/2025, 5:05 PM<http://logger.info|logger.info>("starting tts example agent")
is part of the entrypoint
function in the openai_tts.py
script. It should appear when the TTS example agent starts running, before initializing the OpenAI TTS service with the "nova" voice.
If you are not seeing this log message, please ensure that:
• The script is being executed correctly and reaches the entrypoint
function.
• The logging level is set to display INFO
level messages. You can check or configure the logging settings in your script.
If the issue persists, let me know, and I can assist further.
Sources: Tree View: | dse-workbenchstale-ability-87957
05/12/2025, 5:06 PMpython <file_name> dev
. should i be running it differently?tall-airline-16756
05/12/2025, 5:07 PMopenai_tts.py
script, you should use the following command:
python <file_name>
Ensure that:
• You have installed all the required dependencies as listed in the script's documentation or requirements file.
• Your environment variables are properly set up, as the script uses load_dotenv()
to load them from a .env
file.
Running the script with additional arguments like dev
may not be necessary unless explicitly required by your setup. If you still encounter issues, let me know, and I can assist further.
Sources: Tree View: | dse-workbenchstale-ability-87957
05/12/2025, 5:09 PMpython <file_name> start
the last log message I see is job process initialized
tall-airline-16756
05/12/2025, 5:09 PMjob process initialized
indicates that the job process has been successfully initialized. This message is logged in the proc_main
function after the initialization of the job process.
If this is the last log message you see, it suggests that the script might not be proceeding beyond this point. Please ensure that:
• All required dependencies are installed and up-to-date.
• Your environment variables are correctly configured, as the script relies on them for proper execution.
• You are running the script with the correct command (python <file_name>
or python <file_name> start
if explicitly required).
If the issue persists, let me know, and I can assist further in diagnosing the problem.
Sources: livekit.agents.ipc.job_proc_lazy_main API documentationstale-ability-87957
05/12/2025, 5:15 PMtall-airline-16756
05/12/2025, 5:16 PMload_fnc
and load_threshold
parameters in the WorkerOptions
configuration. By default, workers stop accepting new jobs when their CPU utilization exceeds 75%.
If you have further questions or need clarification, feel free to ask!
Sources: Deploying to production | LiveKit Docs | Deployment and scaling | LiveKit Docsstale-ability-87957
05/12/2025, 5:16 PMtall-airline-16756
05/12/2025, 5:16 PMentrypoint
function in your agent code.
4. Session Close: By default, the room is automatically closed when the last non-agent participant leaves.
If you have additional questions or need further clarification, feel free to ask!
Sources: Worker lifecycle | LiveKit Docsstale-ability-87957
05/12/2025, 5:18 PMtall-airline-16756
05/12/2025, 5:18 PMstale-ability-87957
05/12/2025, 5:18 PM