DEV Community

Cover image for Day 10: Transcription with 3 lines of Python
Dilek Karasoy for Picovoice

Posted on • Edited on

Day 10: Transcription with 3 lines of Python

Amazon Transcribe, Google Speech-to-Text, Azure Cognitive Services, IBM Watson, AssemblyAI, DeepGram, Speechmatics, and Rev, โ€ฆall provide APIs to transcribe audio files. So why should you care about Picovoice Leopard? Just for the Free Tier? Nope! We have more reasons:

Let's get started!

1- Install
Install Leopard from a terminal:

pip3 install pvleoparddemo
Enter fullscreen mode Exit fullscreen mode

2- Try it
Grab your free AccessKey from Picovoice Console and run the microphone demo from the terminal:

leopard_demo_mic --access_key ${YOUR_ACCESS_KEY}
Enter fullscreen mode Exit fullscreen mode

3- Build
Create an instance of Leopard:

from pvleopard import *
o = create(access_key=${YOUR_ACCESS_KEY})
Enter fullscreen mode Exit fullscreen mode

Transcribe an audio file:

transcript, words = o.process_file(${YOUR_AUDIO_FILE_PATH})
print(transcript)
Enter fullscreen mode Exit fullscreen mode

Enjoy!

Top comments (0)