DEV Community

Cover image for Day 19: Local Transcription w .NET
Dilek Karasoy for Picovoice

Posted on

Day 19: Local Transcription w .NET

Processing voice data on the cloud comes at a cost

Historically, there’s been several roadblocks to local transcription. Not anymore with Picovoice Leopard Speech-to-Text SDK for cross-platform .NET.

1- Install Leopard NuGet Package

dotnet add package Leopard
Enter fullscreen mode Exit fullscreen mode

2- Get a Picovoice AccessKey
You should know how to do by now. However, it's your first time, then sign up for the Picovoice Console and get your AccessKey for free.

3- Code

using Pv;
string accessKey = "${ACCESS_KEY}"
Leopard leopard = Leopard.Create(accessKey);
Enter fullscreen mode Exit fullscreen mode

You can

  1. pass an audio file to Leopard OR
  2. record audio and pass in the raw data.

Let's pass it from the microphone:

short[] audio = //.. audio obtained from microphone
string transcript = leopard.Process(audio);
Enter fullscreen mode Exit fullscreen mode

Looking for more:
Open-source demo code
Leopard GitHub repository
Speech-to-text Benchmark

Latest comments (0)