The post has been translated automatically. Original language: Russian
In the English language learning game, sound is not an ornament, but part of the methodology: the player must hear every word, every customer's order, and every line of the plot. There are more than 1,900 such phrases in our Piko game. Recording them in a studio with an announcer is long and expensive, and every new word would mean a new recording session. We have built a pipeline that vocalizes everything with speech synthesis and verifies the result itself. We share how it works.
1. The list of phrases is compiled from the code, not manually.
Words, sentences, customer orders, and plot cues are stored in content files. A separate script runs through them and collects a single list of "everything the game can say out loud" with a key for each phrase, for example two-red-apples. We added a word, and the list updated itself. The automatic test crashes if there is an unrecorded phrase in the list, so there are no "dumb" places left in the game.
2. Speech recognition generation and verification
The script sends each line of the list to the speech synthesis service (we use ElevenLabs with the same voice for the entire game). He immediately runs the received recording through speech recognition and compares the text with the original one. If the synthesizer has swallowed a word, mixed up the stress so that the word is not recognized, or added an extra sound, the recording is not accepted and is generated anew. This is how we check 1,900 files without listening to each one manually.
3. Phrases in their entirety, not in pieces.
At first, we tried saving and gluing together long phrases from individual words: "two" + "red" + "apples". It sounded ragged and unnatural to me, but intonation is important for learning a language. Therefore, every customer's order and every phrase that the player must repeat are recorded in its entirety. Gluing remained only a backup option: if there is no entry for a phrase, the game collects it from the smallest number of ready—made pieces - "Can I have" + "two red apples" + "please".
4. Multiple levels of backup options
- The record uploaded by the team through the admin panel is the first one. So any phrase can be replaced, for example, by recording a live speaker, without releasing a new version of the application.
- Then there is the recording embedded in the application.
- If there is no recording at all, it is the voice of the phone itself (Android or iOS system speech synthesis).
The recordings are stored in compressed mono format, so 1,900 phrases do not significantly increase the size of the application, and they work without the Internet.
What did it give
A new word is voiced in minutes along with the check, the whole game sounds in one voice, and the test does not allow the release of a version with an unvoiced phrase. The next step is to check the recordings by native speakers: machine verification catches pronunciation errors, but not always unnatural intonation.
If you are making an educational product with a large amount of audio, we recommend that you generate a list of phrases from the content from the first day and test the synthesis with speech recognition — this saves weeks of manual work.
В обучающей игре по английскому языку звук — не украшение, а часть методики: игрок должен слышать каждое слово, каждый заказ покупателя и каждую реплику сюжета. В нашей игре Piko таких фраз больше 1900. Записывать их в студии с диктором долго и дорого, а каждое новое слово означало бы новую сессию записи. Мы построили конвейер, который озвучивает всё синтезом речи и сам проверяет результат. Делимся, как он устроен.
1. Список фраз собирается из кода, а не вручную
Слова, предложения, заказы покупателей и реплики сюжета хранятся в файлах контента. Отдельный скрипт проходит по ним и собирает единый список «всё, что игра может сказать вслух» с ключом для каждой фразы, например two-red-apples. Добавили слово — список обновился сам. Автоматический тест падает, если в списке есть фраза без записи, поэтому «немых» мест в игре не остаётся.
2. Генерация и проверка распознаванием речи
Каждую строку списка скрипт отправляет в сервис синтеза речи (мы используем ElevenLabs с одним и тем же голосом для всей игры). Полученную запись он сразу прогоняет через распознавание речи и сравнивает текст с исходным. Если синтез проглотил слово, перепутал ударение так, что слово не узнаётся, или добавил лишний звук, запись не принимается и генерируется заново. Так мы проверяем 1900 файлов, не прослушивая каждый вручную.
3. Фразы целиком, а не из кусочков
Сначала мы пробовали экономить и склеивать длинные фразы из отдельных слов: «two» + «red» + «apples». На слух это звучало рвано и неестественно, а для изучения языка интонация важна. Поэтому каждый заказ покупателя и каждая фраза, которую игрок должен повторить, записаны целиком. Склейка осталась только запасным вариантом: если для фразы нет своей записи, игра собирает её из наименьшего числа готовых кусков — «Can I have» + «two red apples» + «please».
4. Несколько уровней запасных вариантов
- Запись, загруженная командой через панель администратора, — первой. Так любую фразу можно заменить, например записью живого диктора, без выпуска новой версии приложения.
- Затем — запись, встроенная в приложение.
- Если записи нет совсем — голос самого телефона (системный синтез речи Android или iOS).
Записи хранятся в сжатом моно-формате, поэтому 1900 фраз заметно не увеличивают размер приложения, а работают они и без интернета.
Что это дало
Новое слово озвучивается за минуты вместе с проверкой, вся игра звучит одним голосом, а тест не даёт выпустить версию с неозвученной фразой. Следующий шаг — проверка записей носителями языка: машинная проверка ловит ошибки произношения, но не всегда — неестественную интонацию.
Если вы делаете образовательный продукт с большим объёмом аудио, советуем с первого дня генерировать список фраз из контента и проверять синтез распознаванием речи — это экономит недели ручной работы.
Comments 0
Newest Popular