Task: Research and implement local TTS voice generation via a local server
Research and implement local TTS voice generation via a local server
Bypass the OpenRouter limitation when generating audio for single letters and test a local TTS pipeline for the Vietnamese language via a dedicated server.
Context
The basic TTS mechanics via OpenRouter are already implemented, but a technical issue has been discovered: when sending a single letter for voice generation, OpenRouter returns an HTTP 400 error.
This is critical for the primer, as high-quality audio generation of individual letters, sounds, and short phonetic units is required.
Objective
Research and implement an alternative local TTS pipeline via a local server that can stably generate audio for single letters and other minimal units of the Vietnamese language without OpenRouter limitations.
What needs to be tested
- which local TTS models support the Vietnamese language;
- whether they can correctly synthesize single letters, syllables, and very short strings;
- the quality of tones and phonetics;
- the feasibility of running the model on a local server;
- the API for calls from vietnamguru.ru;
- audio formats and generation latency;
- hardware requirements;
- licenses and usage restrictions;
- the possibility of batch generation of the voiceover dictionary;
- compatibility with the existing audio file and metadata storage system.
Proposed Architecture
vietnamguru.ru → local TTS API → local model → audio file → existing voiceover dictionary/storage.
The local mechanism should be treated as a source audio generator; generated recordings, just like in the main TTS pipeline, should be saved and reused rather than synthesized on every playback.
Acceptance Criteria
Find and verify a local generation method that stably accepts single letters and short phonetic elements of the Vietnamese language and produces sound of sufficient quality for further verification by a native speaker.
Ворклоги
Working local TTS option found
VieNeu-TTS is running locally in Docker, currently using version 2.
Main practical result: the model stably synthesizes speech for individual Vietnamese graphemes, including forms with tone marks. This solves the key problem that made OpenRouter/Gemini unsuitable for the primer: minimal inputs like a single letter resulted in HTTP 400 errors or unstable output there.
A set of 18 forms from the a / ă / â group with six tones (a á à ả ã ạ, ă ắ ằ ẳ ẵ ặ, â ấ ầ ẩ ẫ ậ) has been tested. VieNeu-TTS is capable of generating such units on a targeted basis, so it can be used as a phonetic dictionary generator: grapheme/syllable → saved audio file.
The next step is to run a broader set of letters, syllables, and short words, check the quality with native speakers, and then connect the local generator to permanent audio storage so that recordings are not synthesized repeatedly on every playback.
Related parent task: «Develop a custom Vietnamese voiceover pipeline and audio dictionary».
Initial Working Result
A GraphQL resolver for the local Vietnamese TTS has been implemented. An admin page has also been created, providing an overview of letters, combinations, syllables, and their meanings/audio generation.
In other words, the basic technical framework is already functioning: local synthesis can be called via the API, and learning units can be viewed and verified within a single interface.
Refining the interface, data structure, audio quality/validation, and the learning scenario itself will still be required before reaching the end-user system, but the initial working result is already in place.