Run Dify Chat Bot

In this section, we will show you how to make Dify Bot speak in NYRA-Agent playground.

Prerequisites

Make sure the Nyra-Agent playground is running. If it’s not, follow the Run Playground guide to launch the playground.

Ensure you have the following information prepared:

  1. Dify Information:

    • Dify API Key

  2. STT Information: Any supported STT service can be used. For example, Deepgram is relatively easy to register and start using.

  3. TTS Information: Any supported TTS service can be used. Fish.Audio is a simple option to register and get started with.

  4. RTC Information: Currently, only Agora RTC is supported. You can sign up at Agora and ensure you have your App ID and App Certificate ready for configuration in your .env file.

  5. Dify Agent/Chat Assistant: You can use any agent or chat assistant defined in the Dify platform. Each agent or assistant has its own API key.

Steps

To configure your Nyra-Agent, follow these steps:

  1. Open the Playground: Navigate to localhost:3000 to access the Nyra-Agent playground.

  2. Select Graph Type: Choose the voice_assistant graph type.

  3. Open Module Picker: Click on Module Picker to open the module selection menu.

  4. Select STT/TTS Module: If your preferred STT or TTS module is not already selected, you can choose it from the dropdown list. Note that you will need to configure the module with the appropriate information, such as API keys and other settings.

  5. Configure LLM: For the LLM module, click the dropdown and select Dify Chat Bot.

  6. Apply Module: Click Save Changes to apply the selected module to the graph.

  7. Property Configuration: Click on the button next to the graph selection to open the property configuration. A list of properties for the Dify Chat Bot module will be displayed.

  8. Configure Dify API Key: Input the prepared Dify API Key into the property configuration.

  9. Save Properties: Click Save Changes to apply the API key property to the Dify Chat Bot module.

  10. Confirmation: If a success toast appears, the property has been successfully applied to the Dify Chat Bot module.

Using Azure STT

Azure STT is integrated within RTC extension module. That's why if you want to use Azure STT, you will need to select voice_assistant_integrated_stt graph type.

Troubleshooting

If you encounter any issues, please check the following:

  • Make sure you have the correct API Key for Dify Chat Bot.

  • Make sure in Dify your Chat Assistant has a valid model key configured.

  • Make sure you have the correct STT and TTS modules selected and configured.

  • Make sure you have the correct graph type selected.

Last updated