Turn-based conversation
How to use Vocode in non-streaming applications
Overview
A turn-based conversation is a communication system designed for applications where the user utters a single statement, and the agent is expected to respond fully. This model differs from streaming conversations that try to mimic natural human discourse. Instead, it fits applications triggered by some kind of user input. For example, consider a voice memo application where the user records a message, and the agent generates a complete response.
A turn-based conversation system is perfect for applications that donβt require real-time responses or constant back-and-forths. This design reduces complexity and allows for a more controlled conversation flow. Each user input is treated as a discrete event, giving the system time to generate and deliver a full and meaningful response.
Turn-based quickstart
The code can be found here
This example demonstrates a turn-based conversation, using a ChatGPT agent for text generation, WhisperTranscriber for speech-to-text, and AzureSynthesizer for text-to-speech. User interactions trigger the beginning and end of the recording, signaling the system when to listen and when to respond.
Remember to replace OPENAI_API_KEY and AZURE_SPEECH_KEY with your actual API keys and set the appropriate Azure region. You can also customize the voice, system prompt, and initial message as needed.
React turn-based quickstart
π§ Under construction
If you want to work on a sample react app for this, reach out to us!