Logo Lanfrica

elloza/malagasy-tts

Domain:

natural language processing

Record type:

software
Creator:
ell
Host:
A simple example of a Malagasy TTS completely in the browser using Transformers.js # Malagasy TTS: ## Introduction and motivation ๐ŸŽ™๏ธ๐ŸŒ Malagasy TTS is a browser-based text-to-speech (TTS) application that synthesizes text into spoken Malagasy. It leverages the power of machine learning (ML) models to detect the input language, translate it into Malagasy, and generate audio output. This project aims to make TTS accessible to a wider audience, especially for languages with limited resources and tools. The Malagasy language, spoken by over 20 million people in Madagascar and surrounding regions, is a prime example. With its simple, user-friendly interface, this project enables users to convert text into spoken Malagasy (a feature currently unavailable in services like Google Translate) directly in their browser. This approach eliminates the need for complex setups or cloud-based services, making TTS more accessible and inclusive. ## How to use ๐Ÿš€๐Ÿ”Š ## Demo on GitHub Pages ๐ŸŒ You can view a live demo of Malagasy TTS hosted on GitHub Pages: elloza.github.io Enjoy exploring the live demo of Malagasy TTS! ## Technical Overview โš™๏ธ๐Ÿ•ธ๏ธ This project is a lightweight, fully browser-based application that brings the magic of machine learning directly to your local environment. Hereโ€™s a quick look at the technical workflow: - **Web Worker Setup**: Worker scripts (worker.js) handle the heavy lifting by loading multiple ML models (language detection, translation, and text-to-speech) in parallel. This keeps the main UI thread responsive. ๐Ÿš€ (Learn more about Web Workers) - **Model Loading with Transformers.js**: Using the Transformers.js library, the project loads ML pipelines dynamically via module imports in modelLoader.js. The pipelines are configured in config.js, ensuring smooth handling of tasks such as text classification, translation, and TTS. ๐Ÿ”„ - **Dynamic Audio Generation**: Text input is processed into WAV format on the fly. The worker script generates a proper WAV buffer from PCM samples, so synthesized audio plays directly โ€ฆ