```azure: storage: storageAccountName: ...
# ask-ai
b
Copy code
azure:
  storage:
    storageAccountName: 
    storageAccountKey:
    connectionString: 
    containerBlobEndpoint: 
    assetsContainer: 
    blobSignedUrlExpiryTime:
i have the above creds of my azure mucket i want to save the session recordings of the romm in this give me code to integrate it in my livekit agent code
t
Thanks for reaching out, Aman. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm glad you're looking to save your LiveKit session recordings to your Azure storage bucket! You can do this smoothly using the Egress feature, which allows direct exporting of recordings to Azure Blob Storage. Let me walk you through the steps: 1. Set Up Egress with Azure Blob Storage: You'll want to configure the
AzureBlobUpload
settings with these details: ◦ `account_name`: Your Azure storage account name ◦ `account_key`: Your Azure storage account key ◦ `container_name`: The container in your Azure storage account where you'd like to save the recordings 1. Use Environment Variables (Optional): To keep things secure and flexible, you can use environment variables instead of hardcoding your credentials:Once set, these will be detected automatically. ◦
AZURE_STORAGE_ACCOUNT
for the account name ◦
AZURE_STORAGE_KEY
for the account key 1. Initiate Egress via API or CLI: You can kick off the Egress process through the API or CLI. Here's a simple example using Python:
Copy code
from livekit import protocol

azure_upload = protocol.AzureBlobUpload(
    account_name="your_account_name",
    account_key="your_account_key",
    container_name="your_container"
)
If you'd like to dive deeper or need more examples, feel free to check out the Egress examples and Egress API documentation. I'm here if you have any questions along the way! Sources: Egress examples | LiveKit Docs | Session recording and transcripts | LiveKit Docs | Egress API | LiveKit Docs | test/download.go
b
from dotenv import load_dotenv from livekit import agents from livekit.agents import AgentSession, Agent, RoomInputOptions from livekit.plugins import noise_cancellation, silero from livekit.plugins.turn_detector.multilingual import MultilingualModel load_dotenv(".env.local") class Assistant(Agent): def __init__(self) -> None: super().__init__( instructions="""You are a helpful voice AI assistant. You eagerly assist users with their questions by providing information from your extensive knowledge. Your responses are concise, to the point, and without any complex formatting or punctuation including emojis, asterisks, or other symbols. You are curious, friendly, and have a sense of humor.""", ) async def entrypoint(ctx: agents.JobContext): session = AgentSession( stt="assemblyai/universal-streaming:en", llm="openai/gpt-4.1-mini", tts="cartesia/sonic-2:9626c31c-bec5-4cca-baa8-f8ba9e84c8bc", vad=silero.VAD.load(), turn_detection=MultilingualModel(), ) await session.start( room=ctx.room, agent=Assistant(), room_input_options=RoomInputOptions( # For telephony applications, use
BVCTelephony
instead for best results noise_cancellation=noise_cancellation.BVC(), ), ) await session.generate_reply( instructions="Greet the user and offer your assistance." ) if name == "__main__": agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint)) integrate it with the above code please withprecise instructions
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!