On day 26, we'll cover on-device transcription with 3 lines of Python.
Requirements:
- Picovoice AccessKey - you can grab yours from the Picovoice Console for free.
- Leopard Speech-to-Text Python SDK
pip install pvleopard
Let's get started!
- Import Leopard Speech-to-Text
import pvleopard
- Create an instance with your AccessKey:
handle = pvleopard.create(access_key)
Don't forget to replace the access_key with the one you grabbed from the Picovoice Console.
- Transcribe an audio file:
transcript, words = handle.process_file(audio_path)
Don't forget to replace the audio_path with the path for the file you want to transcribe.
DONE!
This tutorial is first published on picovoice.ai
Top comments (0)