Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Replit 9 min read How-to mediumAdept

Build a Speech-to-Text App with AssemblyAI on Replit

A Next.js app on Replit transcribes uploaded audio files with AssemblyAI's speech-to-text API. It uses three API routes: one that parses multipart uploads with multiparty and forwards the file to AssemblyAI's /upload endpoint, one that submits the returned private URL to /transcript, and one that fetches results by ID. A React frontend polls the result route once per second until the status is "completed" or "error". Setup covers Tailwind, Axios, keeping the API key in Replit Secrets, and disabling Next.js's bodyParser so multiparty can parse uploads.

Related posts

  • Transcribe speech 100x faster and 100x cheaper with open models

    Modal mediumAdept

    Open-weights ASR models such as NVIDIA's parakeet-tdt-0.6b-v2 and canary-1b-flash, deployed as a batch transcription service on Modal GPUs, transcribed about a week of ESB benchmark audio in roughly a minute for about $1. That works out to over 100x faster or up to 200x cheaper than a popular proprietary API, at matching or slightly lower WER. The gains come from measuring end-to-end throughput including cold starts and data transfer, shuffling files before dealing them into requests to balance load across workers, and sorting audio by duration within each GPU worker so batch lanes finish together. Parallel threaded downloads also help. Sweeping GPU type and worker count produces a Pareto frontier of cost-versus-speed configurations rather than a single optimum.

  • AssemblyAI: A voice agent can fail without throwing an error

    Render mediumAdept

    A post-hoc quality pipeline for production voice agents re-transcribes each recorded call with AssemblyAI's async Universal 3 Pro model, summarizes it and scores it against a failure rubric via LLM Gateway, then synthesizes fleet-wide findings against deployment history. Run as chained Render Workflows (50 calls became 201 task runs, each step with its own container and retry policy, results in Postgres), the demo traced entity-capture failures rising from 7% to 83% to a deployment that set minimum turn silence too low. The output is a testable hypothesis with evidence, not proof of causality, so a person still has to reproduce and verify the fix.

  • AI Speech Recognition in Unity

    Hugging Face mediumAdept

    Speech recognition can be added to a Unity game with the Hugging Face Unity API by recording microphone input, encoding it as WAV and sending it for transcription. The C# walkthrough builds start/stop buttons and records up to 10 seconds at 44.1 kHz with Microphone.Start. It truncates the clip at the stop position and hand-writes a 16-bit PCM WAV header before calling HuggingFaceAPI.AutomaticSpeechRecognition with success and error callbacks. Button interactability and status messages are added for UX. Reader comments note that the hosted inference endpoint now returns 403 or timeout errors.

  • Experiments with AI video content strategy | Mux

    Mux mediumAdept

    A Node.js pipeline turns an uploaded video into promotional content automatically. It enables Mux static MP4 renditions, listens for the static_renditions.ready webhook, and sends the smallest low.mp4 file to OpenAI's Whisper API for transcription. The transcript then goes to ChatGPT (GPT-4 and gpt-3.5-turbo) with persona-style system prompts to generate a video title and description, promotional tweets and a blog post outline as JSON. Whisper's transcripts proved highly accurate and the generated copy was usable as a first draft, though Mux now offers auto-generated transcripts natively.

  • Building a Playlist Generator with Sentence Transformers

    Hugging Face mediumAdept

    A playlist generator embeds song lyrics with Sentence Transformers and runs semantic search against a text prompt, wrapped in a multi-step Gradio Blocks app on Hugging Face Spaces. Because msmarco-MiniLM-L-6-v3 truncates input at 512 word pieces, songs are split into verses and each verse is embedded and pickled. Searching with top_k=20 and dropping duplicate songs almost always yields at least 9 distinct songs. In the Gradio app, a button click event runs the search and returns gr.Radio.update() to fill the song choices, so users can then pick a song and read its lyrics.

The quest for software engineering knowledge.

Look:
Layout: