Real-Time Speech-to-Speech Translation with Nuxt.js
This repository demonstrates how to use the Palabra API for real-time speech-to-speech translation from English to Spanish using Nuxt.js.
It provides ~/composables/usePalabra.ts
file with clear and step-by-step code examples (relevant to the WebRTC Quick Start Guide).
The repository allows to build the project locally with just a few simple commands, enabling you to experience real-time translation of your own speech directly in your browser.
Key Features:
-
Real-Time Speech Translation: The application integrates with the Palabra API to provide real-time speech translation using WebSockets for translation configuration and transcriptions.
-
WebRTC Audio Streaming with LiveKit: WebRTC, powered by LiveKit, enables low-latency audio streaming. LiveKit is used for sending and receiving the audio streams, ensuring efficient communication between the user and the translation system.
-
Automatic Session Creation: A streaming session is created automatically by sending a request to the Palabra API, which returns session details, including control URLs and tokens.
Nuxt Example
See the usePalabra.ts for the code example with detailed explanations.
Links
- GitHub Repository
- README for more details
- Palabra Quick Start Guide