I am contemplating writing a speech-controlled music player app for android. I am experienced in writing PC applications, and wrote a rather sharp speech controlled MP3 player using VB in the 1990s. I have also used c, c++, and several other languages in the past, but I have zero experience with mobile app development.

My priorities are a fast, memory-efficient app with good command-&-control and dictation abilities (iPhone compatibility would be a plus, but I'm willing to write a separate app for iPhone if the android app goes well).

What language/framework would you recommend?

Dani AI

Generated

Good thinking, — your experience with command grammars from the VB player is very useful. Short practical recommendation: develop Android natively in Kotlin (official, modern, good tooling; performance is comparable to Java) and use Swift for an iOS port. Only move critical audio/DSP into C++ via the NDK if you need measurable CPU or latency gains — that adds complexity and debugging cost.

Decide early on recognition strategy. On-device engines and a small wake-word detector give low latency, offline operation, and better privacy for command-and-control. Cloud speech gives higher dictation accuracy but needs a network and adds latency. For a quick prototype use Android’s built-in recognizer to validate command grammar and UX, then replace the backend with an offline ASR or wake-word engine if you need continuous listening or offline support. Reuse your VB command parsing logic and grammars, but reimplement audio capture and OS integration.

Architect the app so voice processing is a separate module that hands discrete commands to a media playback service. On Android use a foreground media service (MediaSession) and handle audio focus; request RECORD_AUDIO at runtime and explain microphone use to users. Be mindful that background audio/mic use is restricted on newer OS versions and app-store review cares about clear privacy disclosure. As suggested, assistant/Siri integration can be an optional surface, not a replacement for your in-app logic.

If you want, post your expected command list and I’ll suggest concrete libraries and a simple prototype plan for Kotlin.

Recommended Answers

All 2 Replies

I'd use the dev kit from Google. However the Apple approach may be to let Siri do the work. Example: https://www.howtogeek.com/725103/how-to-set-a-default-music-app-on-iphone-and-ipad/ where you say Siri, play Baby Shark in Carl's mp3 player.

For Android I'd integrate with Google Assistant noted at https://developers.google.com/assistant

Unless I misread that you already have your own voice command routines good to go.

PS. Apple has it's own free devkit so a nod to that as well as finding tutorials such as https://blog.appnation.co/add-siri-support-to-your-ios-app-in-minutes-using-swift-86970322286 Mind you that on both platforms I find getting the app into the Apple and Google store is a discussion you have all on its own.

commented: I do have a working speech controlled MP3 player written in VB, so I have some possibly re-usable code... +0

My bet is the VB code is dependent on the OS so what you may get to reuse is the concepts/design which is valuable when going to another design.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.