A tiny cloud speech-to-text server: send it audio, it returns text. Runs
faster-whisper on a Heroku CPU dyno. The point of this phase is to prove the
server is fast enough before we build anything on the phone.
This is a standalone project — it has nothing to do with the launcher repo.
app.py— the web server (one/transcribeendpoint + a/health check)requirements.txt— Python dependenciesProcfile— tells Heroku how to start itruntime.txt— Python version
From inside this voice-server folder:
git init
git add .
git commit -m "Voice STT server"
heroku login
heroku create your-voice-stt # pick any unique name
git push heroku main # (use `master` if your branch is master)
# Whisper needs RAM — give it a 1 GB dyno:
heroku ps:type web=standard-2x
Wait for the build to finish, then check it's alive:
heroku open # or visit https://your-voice-stt.herokuapp.com/
You should see {"status":"ok","model":"base.en"}.
Grab any short English audio clip (.wav, .mp3, or .m4a), then from your
computer:
curl -X POST -F "file=@sample.wav" -w "\nround-trip: %{time_total}s\n" https://your-voice-stt.herokuapp.com/transcribe
The response shows the text, the server-side processing time (seconds), and
the total round-trip time (round-trip). That tells us if cloud Whisper is fast
enough to be worth building the phone side.
First request after a deploy/restart is slow (one-time model download + load). Run it twice and judge the second call.
heroku config:set WHISPER_MODEL=tiny.en # fastest, least accurate
heroku config:set WHISPER_MODEL=base.en # default, balanced
heroku config:set WHISPER_MODEL=small.en # most accurate, slowest
- CPU only — Heroku has no GPU, so this is CPU inference. Fine for tiny/base.
- Online only — the phone will need a data/Wi-Fi connection to use this.
- Cost — a
standard-2xdyno is a paid dyno; this scales with usage at 10k users (see the cost discussion). This phase is just to measure speed. - Ephemeral filesystem: the model re-downloads whenever the dyno restarts.