Introduction
Meshagent CLI
Agents
Documents
Webhooks
Flutter SDK
Examples
Voice
If you want to create a voice service that will run in every room:
Copy
Ask AI
meshagent service create --name "voice" --image docker.io/meshagent/sample-voice:0.0.31 --env="MESHAGENT_PORT=8090" --port "num=8090 type=meshagent.callable liveness=/ path=/agent participant_name=voice"
If you want to test the voice with a single room:
Copy
Ask AI
meshagent service test --room my-room --name "voice" --image docker.io/meshagent/sample-voice:0.0.31 --env="MESHAGENT_PORT=8090" --port "num=8090 type=meshagent.callable liveness=/ path=/agent participant_name=voice"
Here is the voice service code if you want to create your own app:
Copy
Ask AI
from meshagent.livekit.agents.voice import VoiceBot
from meshagent.api.services import ServiceHost
import asyncio
import os
service = ServiceHost()
@service.path("/agent")
class SampleVoiceAgent(VoiceBot):
def __init__(self):
super().__init__(
name="meshagent.livekit.agent",
title="sample voice agent",
description="sample agent that will respond to a query via voice",
labels=[ "voice" ],
auto_greet_prompt="hello",
rules=[
"You are a helpful assistant communicating through voice."
]
)
asyncio.run(service.run())
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.