Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voice STT server (Phase 1 test)

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.

Files

  • app.py — the web server (one /transcribe endpoint + a / health check)
  • requirements.txt — Python dependencies
  • Procfile — tells Heroku how to start it
  • runtime.txt — Python version

Deploy to Heroku

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"}.

Test it (this is the real test)

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.

Switch model (speed vs. accuracy)

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

Notes / caveats

  • 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-2x dyno 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages