Dify chatbot
This guide shows you how to enable voice interactions with your Dify applications in TEN Agent. By connecting speech recognition and synthesis to your Dify chatbot, users can have natural voice conversations with applications built on the Dify platform.
Prerequisites
Before starting, ensure you have:
-
TEN Agent playground running. See the Agent quickstart.
-
API keys for your voice services:
- STT service like Deepgram
- TTS service like Fish.Audio
- Agora RTC credentials from Agora Console
-
Dify API Key for your application from your Dify workspace.
You can use any application created on the Dify platform, including agents or chat assistants. Each application has its own unique API key in the Dify dashboard.
Set up your Dify bot with voice
Connect your Dify application to voice capabilities:
-
Open the playground at
http://localhost:3000
-
Select the
voice_assistant
graph type -
Configure modules:
- Click Module Picker
- Select your preferred STT and TTS modules
- For the LLM module, select Dify Chat Bot
- Click Save Changes
-
Configure Dify properties:
- Click the settings button next to the graph selector
- Enter your Dify API Key
- Click Save Changes
-
Start your voice-enabled application:
- Click Connect to initialize the agent
- Wait a few seconds for startup
- Begin speaking to your Dify application
Azure STT integration
For Azure speech recognition:
- Select the
voice_assistant_integrated_stt
graph type - Configure Azure credentials in the RTC module
- Follow the remaining configuration steps above
Troubleshooting
Common issues and solutions:
Issue | Solution |
---|---|
No response from Dify |
|
Knowledge retrieval issues |
|
Audio problems |
|
Application behavior |
|