How to achieve prerecorded transcription when I us...
# ask-ai
h
How to achieve prerecorded transcription when I use a STT transcriber as an agent
t
Thanks for reaching out, YUNYI. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Here’s a friendly guide to help you get prerecorded transcription up and running using an STT (Speech-to-Text) transcriber as an agent in LiveKit: 1. Start by loading your prerecorded audio file into an
AudioBuffer
. 2. Next, create an instance of an STT plugin that supports batch processing, like
FalAI.WizperSTT
or
Spitch.STT
. 3. Then, call the plugin’s
recognize()
method and pass in your
AudioBuffer
. 4. This method will give you back a
stt.SpeechEvent
with the type
FINAL_TRANSCRIPT
, which contains your transcribed text. From there, you can use this transcription in your agent’s logic—whether that means logging it, saving it to a file, or sending it off to an LLM. If you’d like a hand with any part of this, just give me a shout—I’m here to help! Sources: tests/fake_stt.py | plugins/assemblyai/src/stt.ts | main.py