Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETFlutterlink to GoiOSJavaNVIDIA JetsonLinuxmacOSNodejsPythonRaspberry PiReact NativeRustWebWindows
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutterlink to GoiOSJavaNVIDIA JetsonLinuxmacOSNodejsPythonRaspberry PiReact NativeRustWebWindows
AndroidC.NETFlutterlink to GoiOSJavaNodejsPythonReact NativeRustWeb
FAQ
Introduction
AndroidCiOSLinuxmacOSPythonWebWindows
AndroidCiOSPythonWeb
SummaryOctopus Speech-to-IndexGoogle Speech-to-TextMozilla DeepSpeech
FAQ
Introduction
AndroidAngularArduinoBeagleBoneCChrome.NETEdgeFirefoxFlutterlink to GoiOSJavaNVIDIA JetsonLinuxmacOSMicrocontrollerNodejsPythonRaspberry PiReactReact NativeRustSafariUnityVueWebWindows
AndroidAngularC.NETFlutterlink to GoiOSJavaMicrocontrollerNodejsPythonReactReact NativeRustUnityVueWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidAngularBeagleBoneCChrome.NETEdgeFirefoxFlutterlink to GoiOSJavaNVIDIA JetsonLinuxmacOSNodejsPythonRaspberry PiReactReact NativeRustSafariUnityVueWebWindows
AndroidAngularC.NETFlutterlink to GoiOSJavaNodejsPythonReactReact NativeRustUnityVueWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidBeagleboneCiOSNVIDIA JetsonLinuxmacOSPythonRaspberry PiRustWebWindows
AndroidCiOSPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidCiOSNVIDIA JetsonLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSNVIDIA JetsonLinuxmacOSPythonRaspberry PiWebWindows
AndroidCPythoniOSWeb
Introduction
AndroidAngularArduinoBeagleBoneC.NETFlutterlink to GoiOSJavaNVIDIA JetsonMicrocontrollerNodejsPythonRaspberry PiReactReact NativeRustUnityVueWeb
AndroidAngularCMicrocontroller.NETFlutterlink to GoiOSJavaNodejsPythonReactReact NativeRustUnityVueWeb
Picovoice SDK - FAQ
IntroductionSTM32F407G-DISC1 (Arm Cortex-M4)STM32F411E-DISCO (Arm Cortex-M4)STM32F769I-DISCO (Arm Cortex-M7)IMXRT1050-EVKB (Arm Cortex-M7)
Introduction
AndroidC.NETFlutterlink to GoiOSNodejsPythonReact NativeRustUnityWeb
AndroidC.NETFlutterlink to GoiOSNodejsPythonReact NativeRustUnityWeb
FAQGlossary

Voice Processor
Flutter API

API Reference for the Voice Processor Flutter SDK (pub.dev ).


VoiceProcessor

class VoiceProcessor { }

Class for capturing audio and delivering frames to registered frame listeners.


VoiceProcessor.instance

static VoiceProcessor? get instance

Singleton instance of the VoiceProcessor class.

Returns

  • VoiceProcessor? : The singleton instance of VoiceProcessor.

VoiceProcessor.numFrameListeners

int get numFrameListeners

Gets the number of registered frame listeners.

Returns

  • int : The number of registered frame listeners.

VoiceProcessor.numErrorListeners

int get numErrorListeners

Gets the number of registered error listeners.

Returns

  • int : The number of registered error listeners.

VoiceProcessor.addFrameListener()

void addFrameListener(VoiceProcessorFrameListener listener)

Adds a new listener that receives audio frames.

Parameters

  • listener VoiceProcessorFrameListener : Listener function that executes user code on a frame of audio.

VoiceProcessor.addFrameListeners()

void addFrameListeners(List<VoiceProcessorFrameListener> listeners)

Adds a list of listeners that receive audio frames.

Parameters

  • listeners List<VoiceProcessorFrameListener> : List of listener functions that execute user code on frames of audio.

VoiceProcessor.removeFrameListener()

void removeFrameListener(VoiceProcessorFrameListener listener)

Removes a previously added frame listener.

Parameters

  • listener VoiceProcessorFrameListener : The listener function to be removed.

VoiceProcessor.removeFrameListeners()

void removeFrameListeners(List<VoiceProcessorFrameListener> listeners)

Removes previously added frame listeners.

Parameters

  • listeners List<VoiceProcessorFrameListener> : List of listener functions to be removed.

VoiceProcessor.clearFrameListeners()

void clearFrameListeners()

Removes all frame listeners.


VoiceProcessor.addErrorListener()

void addErrorListener(VoiceProcessorErrorListener errorListener)

Adds a new error listener.

Parameters

  • errorListener VoiceProcessorErrorListener : Listener function that handles errors.

VoiceProcessor.removeErrorListener()

void removeErrorListener(VoiceProcessorErrorListener errorListener)

Removes a previously added error listener.

Parameters

  • errorListener VoiceProcessorErrorListener : The error listener function to be removed.

VoiceProcessor.clearErrorListeners()

void clearErrorListeners()

Removes all error listeners.


VoiceProcessor.start()

Future<void> start(int frameLength, int sampleRate)

Starts audio recording with the given sampleRate and delivering audio frames of size frameLength to registered frame listeners.

Parameters

  • frameLength int : Number of audio samples per frame to be delivered via the listeners.
  • sampleRate int : Audio sample rate of the recorded audio.

Throws

  • VoiceProcessorException : If an error occurs while attempting to start audio capture.

Returns

  • Future<void> : A future that resolves when audio recording starts.

VoiceProcessor.stop()

Future<void> stop()

Stops audio recording.

Throws

  • VoiceProcessorException : If an error occurs while attempting to stop audio capture.

Returns

  • Future<void> : A future that resolves when audio recording stops.

VoiceProcessor.isRecording()

Future<bool?> isRecording()

Checks if audio recording is currently in progress.

Returns

  • Future<bool?> : A future that resolves with a boolean indicating whether recording is active or not.

VoiceProcessor.hasRecordAudioPermission()

Future<bool?> hasRecordAudioPermission()

Checks if the app has permission to record audio and prompts the user if not.

Returns

  • Future<bool?> : A future that resolves with a boolean indicating whether the application has permission to record audio or not.

VoiceProcessorFrameListener

typedef void VoiceProcessorFrameListener(List<int> frame);

Listener type for receiving audio frames from the VoiceProcessor.


VoiceProcessorErrorListener

typedef void VoiceProcessorErrorListener(VoiceProcessorException error);

Listener type for receiving errors from the VoiceProcessor.


VoiceProcessorException

class VoiceProcessorException implements Exception {
final String? message;
VoiceProcessorException([this.message]);
}

Exception class for errors related to the VoiceProcessor.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Voice Processor Flutter API
  • VoiceProcessor
  • instance
  • numFrameListeners
  • numErrorListeners
  • addFrameListener()
  • addFrameListeners()
  • removeFrameListener()
  • removeFrameListeners()
  • clearFrameListeners()
  • addErrorListener()
  • removeErrorListener()
  • clearErrorListeners()
  • start()
  • stop()
  • isRecording()
  • hasRecordAudioPermission()
  • VoiceProcessorFrameListener
  • VoiceProcessorErrorListener
  • VoiceProcessorException
Platform
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Koala Noise Suppression
  • Eagle Speaker RecognitionBETA
  • Octopus Speech-to-Index
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
  • Orca Text-to-SpeechWAITLIST
  • Falcon Speaker DiarizationWAITLIST
Resources
  • Docs
  • Console
  • Blog
  • Use Cases
Sales & Services
  • Consulting
  • Developer Plan
  • Enterprise Plan
  • Support Add-on
Company
  • About us
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • Twitter
  • Medium
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2022 Picovoice Inc.