Use Generate speech to create WAV audio from text with Luna-TTS 1.5. Use Translate audio to turn a short recording into translated text and optional WAV audio with Luna Translator.
- Create a VUI Labs China project API key.
- Install the Luna-TTS plugin in Dify. For local evaluation, use Plugins → Install via Local File and select the
.difypkgfile. - In Luna-TTS and Translator by VUI Labs, save the project key in VUI Labs China TTS API key. Saving it sends one short synthesis request, which can consume API credits. The API pricing details apply to synthesis.
The Dify plugin runtime needs outbound HTTPS and WSS access to api.vuilabs.cn. The translation tool reads signed files from Dify Cloud file hosts or the standard Community Edition internal file service at http://api:5001. Use a Dify version at or above the minimum declared in the manifest. Local builds are unsigned and intended for development or test installation.
- Add a text input named
announcement. - Add the Generate speech tool. Bind Text to the input and choose a system voice for that language.
- In the workflow Output node, expose the tool's
filesoutput. - Run the workflow with a short example such as
Welcome to the VUI Labs voice demo.and an English voice. The output is one WAV file.
The tool uses system voices from the live Luna-TTS 1.5 catalog. Text may contain up to 500 weighted characters. Chinese, Japanese, and Korean letters count as two, and line breaks do not count. Request limits and options are described in the synthesis API reference.
- In Luna-TTS and Translator by VUI Labs, save a China project key with interpretation access and available interpretation quota in VUI Labs China interpretation API key. Credential validation queries its preset voice catalog without starting an interpretation session. If this field is blank, Translate audio uses the TTS key.
- Upload a PCM16 WAV through Dify using a single-file input. The file can have one or two channels and a sample rate between 8 and 48 kHz. The limit is 30 seconds and 6 MiB.
- Bind the file to Translate audio. Select the recording language, the translation language, and a preset voice for that language or Text only.
- Expose the tool's
text,files,request_id, andaudio_statusoutputs as needed.audio_statusiscompleteif audio was returned,not_requestedfor text-only mode, orunavailableif the service completed text translation but produced no complete speech output.
This workflow processes a file and delivers results when translation completes. For live microphone interpretation and captions, use the Luna Translator application. See the interpretation v3 API reference for supported languages and quota.
The plugin privacy notice explains how text, credentials, and generated audio are handled.
Use Python 3.12. From the plugin source root, install requirements.txt and run python -m unittest discover -s tests -v. For a Dify development session, use its remote debugging workflow.