Transcribe Speech to Text with Python for Free

Alireza Kenarsari
Picovoice
Published in
2 min readMar 30, 2022

Amazon Transcribe, Google Speech-to-Text, Azure Cognitive Services, IBM Watson, AssemblyAI, DeepGram, Speechmatics, and Rev, … all provide APIs to transcribe audio files. You should give Picovoice Leopard a try not only because it offers free transcription but also because it is:

  • Private — All voice processing runs locally
  • Accurate [1]
  • Compact and Computationally Efficient [2]
  • Cross-Platform — Runs on Linux, macOS, Windows, Android, iOS, Raspberry Pi, and NVIDIA Jetson

You can get started with 3 lines of code!

1- Install

Install Leopard from a terminal:

pip3 install pvleoparddemo

2- Try it

Sign up for Picovoice Console using GitHub (or email) and grab your free AccessKey (no credit card required):

Picovoice Console

Run the microphone demo from the terminal:

leopard_demo_mic --access_key ${YOUR_ACCESS_KEY}
Leopard Microphone Demo

3- Build

Create an instance of Leopard:

from pvleopard import *
o = create(access_key=${YOUR_ACCESS_KEY})

Transcribe an audio file:

transcript, words = o.process_file(${YOUR_AUDIO_FILE_PATH})
print(transcript)

4- Resources

--

--