This Speech-to-Text application provides an interactive interface for users to record audio messages using their microphone and receive accurate transcriptions.
Create the FlexAI secret that contains your HF token in order to access the inference models:
# Enter your HF token value when prompted
flexai secret create hf-tokenStart the FlexAI endpoint of the LLM:
LLM_INFERENCE_NAME=speech2text
flexai inference serve $LLM_INFERENCE_NAME --hf-token-secret hf-token --runtime vllm-nvidia-0.10.1 -- --model=openai/whisper-large-v3Store the returned Inference Endpoint API KEY and Endpoint URL:
export LLM_API_KEY=<store the given API key>
export LLM_URL=$(flexai inference inspect $LLM_INFERENCE_NAME -j | jq .config.endpointUrl -r)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/
cd code/speech-to-text/pip install -r requirements.txtpython main.pyThe application will start and display two URLs:
http://127.0.0.1:7860)https://xxxxxxxxxx.gradio.live)
To celebrate this launch we’re offering €100 starter credits for first-time users!
Get Started Now