Skip to main content
This Speech-to-Text application provides an interactive interface for users to record audio messages using their microphone and receive accurate transcriptions.

Start the FlexAI endpoints

Create the FlexAI secret that contains your HF token in order to access the inference models:
Start the FlexAI endpoint of the LLM:
Store the returned Inference Endpoint API KEY and Endpoint URL:
You’ll notice the last export line uses the jq tool to extract the value of endpointUrl from the JSON output of the inspect command.If you don’t have it already, you can get jq from its official website: https://jqlang.org/

Setup

1

Navigate to the speech-to-text directory

2

Install the required dependencies

3

Run the application

The application will start and display two URLs:
  • Local URL: For local access (e.g., http://127.0.0.1:7860)
  • Public URL: For sharing (e.g., https://xxxxxxxxxx.gradio.live)
Open either URL in your browser to start transcribing audio.

Usage

  1. Access the Interface: Open the Gradio interface in your web browser. To avoid any microphone access permission errors, prefer to use the public URL rather than the local one.
  2. Record Audio:
    • Click the record icon to start recording
    • Speak your message
    • Click stop when finished recording
  3. Get Transcription: Click the “Transcribe” button to process your audio and receive the text transcription.
  4. View Results: The transcribed text will appear in the results panel on the right side of the interface.

Code

main.py

requirements.txt

⚡ Deploy this on FlexAI

Any model, NVIDIA or AMD, live in under 60 seconds. No code changes, no infra management, hardware-agnostic.

Get started →Talk to us