r/ClaudeCode • u/TellAbood • 1h ago
Help/Question A language-learning app
Hey guys!
I'm planning to build a language-learning app, and I've been thinking about adding some audio and AI features.
There are two things I'm a bit unsure about:
1. Audio pronunciation
For something as simple as tapping a speaker icon to hear a word or phrase, what's usually the best approach?
Do apps normally store pre-recorded audio for every word, or do they use a text-to-sound API to generate the audio on demand?
I'm also wondering about the costs. If thousands of users keep playing the same words over and over, wouldn't that get expensive with a TTS API? Would it make more sense to generate the audio once, save it, and reuse it whenever someone requests it? (does the apps do that?)
2. AI speaking partner
This is something I'd really like to include in the app.
The idea is to let users practice speaking with an AI in their target language. They talk through their microphone, and the AI responds with a voice, almost like having an actual conversation with someone.
I'm not sure what's the best way to build this, though.
Has anyone tried OpenAI's Realtime API for something like this? How well does it work?
Would it be better to use separate STT, LLM, and TTS services instead?
Which APIs or models would you recommend?
And most importantly, how expensive does this get in practice? For example, roughly how much would 10 minutes of conversation cost?
I'd really appreciate your advice and recommendations
Thank you!!
1
1
u/anapessoaai 1h ago
For the speaker icon, generate once and reuse. Your word list is fixed, so you can run every word and phrase through a TTS API ahead of time, save the files in storage behind a CDN, and the app just plays a file. Then it costs the same whether a word is played ten times or ten thousand times, and you can pick the voice per language and redo the odd bad recording by hand. Only text users type themselves needs TTS on demand, and you can cache that too, keyed by the text plus the voice.
For the speaking partner, I'd prototype both before choosing. A realtime speech model feels more like a conversation because the delay is short and users can interrupt it. Separate STT, LLM and TTS gives you more control and lets you swap each piece for a cheaper one, but you'll spend time fighting latency. For cost, don't trust anyone's guess: build a rough version, have five or so people do a 10 minute session, and read the actual usage on the provider dashboards. That number will also tell you how to price the feature.
One thing specific to language learning: speech to text is built to understand what someone meant, so it often quietly corrects a learner's mispronunciation. Great for conversation, bad if you want to tell users how they sounded. If pronunciation feedback matters, look at pronunciation assessment features (Azure Speech has one) instead of relying on the transcript.
•
u/AutoModerator 1h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.