Start the FlexAI endpoints
Create the FlexAI secret that contains your HF token in order to access the inference models: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
- Local URL: For local access (e.g.,
http://127.0.0.1:7860) - Public URL: For sharing (e.g.,
https://xxxxxxxxxx.gradio.live)
Usage
- 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.
-
Record Audio:
- Click the record icon to start recording
- Speak your message
- Click stop when finished recording
- Get Transcription: Click the “Transcribe” button to process your audio and receive the text transcription.
- 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