r/iOSProgramming • • 11m ago

App Saturday Built a conversation translator in Expo. Notes on turn-taking, keeping API keys off the device, and cold starts

Hi all, App Saturday post, I'm the developer.

SpeechMiles is a travel translator for iPhone: one phone between two people, one tap, then the mic stays open and each turn comes out in the other person's language. Built with Expo / React Native on the New Architecture, with a small Firebase backend.

A few things that were harder than I expected:

- Who spoke. Deciding the direction from the detected language breaks all the time (short replies, mixed languages, names). I ended up deciding it once per turn from who was speaking, and when it can't tell, it doesn't guess.

- Keeping keys off the phone. Speech, translation and voice all go through my own server functions, with App Attest on every call, so the app holds nothing worth stealing.

- Cold starts. Functions that sleep made the first turn slow, so the few on the voice path stay warm. That's most of my hosting bill.

- Paying per use without a subscription. A small ledger on the server charges each turn at its real cost, and a failed call costs the user nothing.

It's paid: $14.99 launch price until 1 January, then $24.99, no subscription.

https://apps.apple.com/app/id6821356688

Happy to go deeper on any of it, especially the open-mic turn handling.

1 Upvotes

0 comments sorted by