Real-Time Speech-to-Speech Translation with Python
The repository provides an example of how to leverage the Palabra API for real-time speech-to-speech translation using Python. The demonstration uses a pre-recorded audio file, which is streamed to a WebRTC server. The server processes the input and returns the translated speech in real-time.
Key Features:
-
Real-time speech translation using the Palabra API:
- Supports managing translations via the WebSocket API.
- Uses LiveKit for sending and receiving audio streams.
- Receives translations and captions as LiveKit Data Messages.
-
WebRTC integration for low-latency audio streaming. A simple demonstration using a pre-recorded audio file to show how it works.
-
This example can serve as a starting point for developing fully automated, real-time translation systems in live environments.
-
The Palabra API allows you to create a browser-based web application that translates a user's real-time speech using WebSockets.
Python Example
See the main.py for the code example with detailed explanations.
Links
- Gitlab Repository
- README for more details