Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice Cheetah
FAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryAmazon PollyAzure TTSElevenLabsOpenAI TTSPicovoice Orca
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidCNode.jsPythoniOSWeb
SummaryPicovoice EaglepyannoteSpeechBrainWeSpeaker
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice FalconAmazon TranscribeAzure Speech-to-TextGoogle Speech-to-Textpyannote
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeRustUnityWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustUnityWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiRustWebWindows
AndroidC.NETiOSNode.jsPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Leopard Speech-to-Text
.NET API

API Reference for the .NET Leopard SDK (NuGet)


namespace: Pv


Leopard

public class Leopard : IDisposable { }

Class for the Leopard Speech-to-Text engine.


Leopard.Create()

public static Leopard Create(
string accessKey,
string modelPath,
bool enableAutomaticPunctuation = false,
bool enableDiarization = false)

Leopard constructor.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • modelPath string : Absolute path to the file containing model parameters (.pv).
  • enableAutomaticPunctuation bool : Whether to enable automatic punctuation.
  • enableDiarization bool : Whether to enable diarization. Set to true to enable speaker diarization, which allows Leopard to differentiate speakers as part of the transcription process. Word metadata will include a speaker_tag to identify unique speakers.

Returns

  • Leopard: An instance of Leopard Speech-To-Text engine.

Throws

  • LeopardException: If an error occurs while creating an instance of the Leopard Speech-to-Text engine.

Leopard.Process()

public LeopardTranscript Process(Int16[] pcm)

Processes given audio data and returns its transcription. The incoming audio needs to have a sample rate equal to .SampleRate() and be 16-bit linearly-encoded. Furthermore, Leopard operates on single channel audio. If you wish to process data in a different sample rate or format consider using .ProcessFile().

Parameters

  • pcm short[] : Audio data.

Returns

  • LeopardTranscript: object which contains the transcription results of the engine.

Throws

  • LeopardException: if there is an error while processing the audio frame.

Leopard.ProcessFile()

public LeopardTranscript ProcessFile(string audioPath)

Processes a given audio file and returns its transcription.

Parameters

  • audioPath string : Absolute path to the audio file. The supported audio file formats are: 3gp (AMR), FLAC , MP3, MP4/m4a (AAC), Ogg, WAV and WebM.

Returns

  • LeopardTranscript: object which contains the transcription results of the engine.

Throws

  • LeopardException: if there is an error while processing the audio file.

Leopard.SampleRate

public int SampleRate { get; private set; }

Getter for audio sample rate accepted by Picovoice.

Returns

  • int: Audio sample rate accepted by Picovoice.

Leopard.Version

public string Version { get; private set; }

Getter for version.

Returns

  • string: Current Leopard version.

LeopardTranscript

public class LeopardTranscript {
public LeopardTranscript(string transcriptString, LeopardWord[] wordArray)
}

Class that contains transcription results returned from Leopard.process() and Leopard.processFile().

Parameters

  • transcriptString String : Inferred transcription.
  • wordArray LeopardWord[] : Transcribed words and their associated metadata.

LeopardTranscript.TranscriptString

public string TranscriptString { }

Getter for the inferred transcription.

Returns

  • String: Inferred transcription.

LeopardTranscript.WordArray

public LeopardWord[] WordArray { }

Getter for transcribed words and their associated metadata.

Returns

  • LeopardWord[]: Transcribed words and their associated metadata.

LeopardWord

public class LeopardWord{
public LeopardWord(string word, float confidence, float startSec, float endSec, int speakerTag)
}

Class for storing word metadata.

Parameters

  • word String : Transcribed word.
  • confidence float : Transcription confidence. It is a number within [0, 1].
  • startSec float : Start of word in seconds.
  • endSec float : End of word in seconds.
  • speakerTag int : The speaker tag is -1 if diarization is not enabled during initialization; otherwise, it's a non-negative integer identifying unique speakers, with 0 reserved for unknown speakers.

LeopardWord.Word

public string Word { get; private set; }

Getter for the transcribed word.

Returns

  • String: Transcribed word.

LeopardWord.Confidence

public float Confidence { get; private set; }

Getter for the transcription confidence.

Returns

  • float: Transcription confidence. It is a number within [0, 1].

LeopardWord.StartSec

public float StartSec { get; private set; }

Getter for the start of word in seconds.

Returns

  • float: Start of word in seconds.

LeopardWord.EndSec

public float EndSec { get; private set; }

Getter for the end of word in seconds.

Returns

  • float: End of word in seconds.

LeopardWord.SpeakerTag

public int SpeakerTag { get; private set; }

Getter for the speaker tag.

Returns

  • int: Speaker tag associated with speaker.

LeopardException

public class LeopardException : Exception

Exception thrown if an error occurs within Leopard Speech-to-Text engine.

Exceptions:

public class LeopardActivationException : LeopardException { }
public class LeopardActivationLimitException : LeopardException { }
public class LeopardActivationRefusedException : LeopardException { }
public class LeopardActivationThrottledException : LeopardException { }
public class LeopardIOException : LeopardException { }
public class LeopardInvalidArgumentException : LeopardException { }
public class LeopardInvalidStateException : LeopardException { }
public class LeopardKeyException : LeopardException { }
public class LeopardMemoryException : LeopardException { }
public class LeopardRuntimeException : LeopardException { }
public class LeopardStopIterationException : LeopardException { }

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Leopard Speech-to-Text .NET API
  • Leopard
  • Create()
  • Process()
  • ProcessFile()
  • SampleRate
  • Version
  • LeopardTranscript
  • TranscriptString
  • WordArray
  • LeopardWord
  • Word
  • Confidence
  • StartSec
  • EndSec
  • SpeakerTag
  • LeopardException
Voice AI
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Orca Text-to-Speech
  • Koala Noise Suppression
  • Eagle Speaker Recognition
  • Falcon Speaker Diarization
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Local LLM
  • picoLLM Inference
  • picoLLM Compression
  • picoLLM GYM
Resources
  • Docs
  • Console
  • Blog
  • Use Cases
  • Playground
Sales & Services
  • Consulting
  • Foundation Plan
  • Enterprise Plan
  • Enterprise Support
Company
  • About us
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • X
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2025 Picovoice Inc.