Interview Prep
Interview questions, roadmaps and practice sets
Tutorials
Free tutorials on 30+ topics
Blog
Career guides, skills and interview tips
Free PDFs
Notes, cheat sheets and question banks
Certificates
Free skill tests and course certificates
Tools & Whiteboard
Free tools you can use right in the browser
Practice Tests
Mock tests, MCQs and quick Q&A
Free LMS
Learn on the Uncodemy LMS
Choose the best training program according to your career.
Improve the performance of your business with our innovative Industrial Training Program.
Read More →
Our instructor-led training classes are designed to make you an expert.
Read More →
Real-life case studies are a great way to demonstrate your practical knowledge.
Read More →
Explore blogs, latest technologies and industry updates with practical examples.
Read More →Browse all available training programs and choose the right one for your career.
Read More →Know more about who we are and what we stand for.
Discover our mission to equip individuals with essential IT skills and industry expertise.
Read More →
Free tutorials, interview questions, tools and calculators to help you learn.
Explore →Learn, practice and plan your career — bilkul free.
Book a free video counselling session and pick the right course for you.
Read More →Say "remind me to pay the electricity bill on Friday" to a banking or utility app, and five things happen in a second or two: the app records audio, converts it to text, works out what you want and the details (a reminder, the bill, Friday), performs the action, and replies in a spoken voice. Each of those steps uses a different kind of AI, and each can run on the phone or in the cloud. Following that one request through the app is the clearest way to see how voice assistants are built.
The app needs the microphone permission (RECORD_AUDIO on Android, a microphone and speech-recognition usage description on iOS) and a clear way to start listening, usually a mic button. Always-on wake words such as "Hey Google" are handled by the operating system; third-party apps normally use push-to-talk, which is also better for privacy and battery.
Automatic speech recognition turns audio into text. You have three broad choices:
| Option | Examples | Trade-offs |
|---|---|---|
| Built-in platform recognisers | Android SpeechRecognizer; iOS Speech framework | Free to call, easy to add; limited control; language support depends on the device |
| Cloud APIs | Google Cloud Speech-to-Text, Azure AI Speech, Amazon Transcribe, OpenAI's transcription API | Strong accuracy and many languages; costs per minute; audio leaves the device |
| Open models on device or your server | OpenAI Whisper and its smaller variants; Indian-language models from AI4Bharat | Full control and privacy; you handle performance, model size and updates |
For Indian users, test with real accents, background noise and code-mixed speech ("kal ka reminder set karo for 9 am"). The Government of India's Bhashini platform and AI4Bharat's open models are worth evaluating for Hindi and other Indian languages.
Here is the built-in Android route in Kotlin:
class VoiceActivity : AppCompatActivity() {
private lateinit var recognizer: SpeechRecognizer
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
recognizer = SpeechRecognizer.createSpeechRecognizer(this)
recognizer.setRecognitionListener(object : RecognitionListener {
override fun onResults(results: Bundle?) {
val text = results
?.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION)
?.firstOrNull() ?: return
handleCommand(text)
}
override fun onError(error: Int) {
speak("Sorry, I didn't catch that.")
}
override fun onReadyForSpeech(params: Bundle?) {}
override fun onBeginningOfSpeech() {}
override fun onRmsChanged(rmsdB: Float) {}
override fun onBufferReceived(buffer: ByteArray?) {}
override fun onEndOfSpeech() {}
override fun onPartialResults(partialResults: Bundle?) {}
override fun onEvent(eventType: Int, params: Bundle?) {}
})
}
// Call after the RECORD_AUDIO permission is granted
fun startListening() {
val intent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH).apply {
putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM)
putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en-IN")
}
recognizer.startListening(intent)
}
override fun onDestroy() {
recognizer.destroy()
super.onDestroy()
}
}
On Android 12 and later, SpeechRecognizer.createOnDeviceSpeechRecognizer() requests recognition without sending audio to a server, where the device supports it. On iOS, SFSpeechRecognizer has a requiresOnDeviceRecognition option for the same purpose.
Text is not yet an action. The app must find the intent (what the user wants) and the slots (the details). For "remind me to pay the electricity bill on Friday": intent = create_reminder, task = "pay the electricity bill", date = next Friday.
For an app with a handful of commands, simple matching is fast, free and predictable:
fun handleCommand(raw: String) {
val text = raw.lowercase()
val reminder = Regex("""remind me to (.+?) (?:on|at|by) (.+)""").find(text)
when {
"balance" in text -> showBalance()
reminder != null -> {
val (task, time) = reminder.destructured
createReminder(task, time) // parse "friday" or "9 am" separately
}
else -> speak("You can say: check balance, or remind me to ...")
}
}
For more commands and varied phrasing, train a small intent classifier on example sentences, or use a dialogue framework such as Rasa.
Large language models handle open-ended phrasing well. You describe the actions your app supports as "tools" (functions with a JSON schema), and the model returns which tool to call with which arguments:
{
"name": "create_reminder",
"description": "Create a reminder for the user",
"parameters": {
"type": "object",
"properties": {
"task": { "type": "string" },
"datetime": { "type": "string", "description": "ISO 8601 date-time" }
},
"required": ["task", "datetime"]
}
}
Your app, not the model, then runs create_reminder after validating the arguments. Never let a model trigger payments or other sensitive actions without an explicit on-screen confirmation, and keep the API key on your server, not inside the app.
After the action, give a short confirmation: "Done. I'll remind you on Friday at 9 a.m. to pay the electricity bill." Read the important details back so the user can catch recognition errors. For speech output, Android provides TextToSpeech and iOS provides AVSpeechSynthesizer; cloud neural voices sound more natural but add cost and latency.
Instead of, or as well as, an in-app mic, you can let users reach your app through the phone's assistant. On Android this is done with App Actions declared in shortcuts.xml; on iOS with the App Intents framework, which exposes actions to Siri and Shortcuts.
Track word error rate on a test set of real recordings, the share of requests that map to the right intent, and how often users give up and switch to typing. Test on low-cost phones and slow networks, not only on a flagship device.
To build a prototype quickly, try making your own voice assistant in Python first, then move the ideas to mobile. For browser-based apps, see how to add AI voice features to web applications. A related project is a voice translation mobile app, and if you plan to run models on the phone, compare lightweight AI models for mobile.
Sources: Android Developers (SpeechRecognizer, RecognizerIntent, TextToSpeech, App Actions); Apple Developer (Speech framework, AVSpeechSynthesizer, App Intents); OpenAI Whisper repository; Bhashini (Government of India); AI4Bharat (IIT Madras).