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
Flutter API

API Reference for the Flutter Leopard SDK (pub.dev)


Leopard

class Leopard { }

Class for the Leopard Speech-to-Text engine. Leopard must be initialized using create(). Resources should be cleaned when you are done using the delete() function.


Leopard.create()

Static creator for initializing Leopard.

static Future<Leopard> create(
String accessKey,
String modelPath,
{
enableAutomaticPunctuation = false,
enableDiarization = false
})

Parameters

  • accessKey String : AccessKey obtained from Picovoice Console.
  • modelPath String : Path to the file containing model parameters (.pv). Can be either a path that is relative to the project's assets folder or an absolute path to the file on device.
  • enableAutomaticPunctuation bool? : (Optional) Set to true to enable automatic punctuation insertion.
  • enableDiarization bool? : (Optional) 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

  • Future<Leopard> an instance of the speech-to-text engine.

Throws

  • LeopardException : If not initialized correctly.

Leopard.process()

Process a frame of pcm audio with the speech-to-text engine.

Future<LeopardTranscript> process(List<int>? frame)

Parameters

  • frame List<int> : a frame of audio samples to be assessed by Leopard. The required audio format is found by calling .sampleRate to get the required sample rate. Audio must be single-channel and 16-bit linearly-encoded.

Returns

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

Throws

  • LeopardException : If process fails.

Leopard.processFile()

Processes a given audio file with the speech-to-text-engine.

Future<LeopardTranscript> processFile(String path)

Parameters

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

Returns

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

Throws

  • LeopardException : If process fails.

Leopard.delete()

Frees memory that was allocated for Leopard

Future<void> delete()

Leopard.sampleRate

int get sampleRate

Getter for the audio sample rate required by Leopard.


Leopard.version

String get version

Getter for Leopard version string.


LeopardException

class LeopardException implements Exception { }

Exception thrown if an error occurs within Leopard:

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

LeopardTranscript

class LeopardTranscript

Class that contains results from Leopard's process functions.


LeopardTranscript.transcript

String get transcript

Getter for transcript data.

Returns

  • String: Inferred transcript.

LeopardTranscript.words

List<LeopardWord> get words

Getter for word metadata in the form of LeopardWords.


LeopardWord

class LeopardWord

Class that contains word metadata.


LeopardWord.word

String get word

Getter for the transcribed word.


LeopardWord.startSec

final double startSec

Start time of word in seconds.


LeopardWord.endSec

final double endSec

End time of word in seconds.


LeopardWord.confidence

final double confidence

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

LeopardWord.speakerTag

final int speakerTag

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.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Leopard Speech-to-Text Flutter API
  • Leopard
  • create()
  • process()
  • processFile()
  • delete()
  • sampleRate
  • version
  • LeopardException
  • LeopardTranscript
  • transcript
  • words
  • LeopardWord
  • word
  • startSec
  • endSec
  • confidence
  • speakerTag
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.