Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeWeb
SummaryPicovoice CheetahAzure Real-Time Speech-to-TextAmazon Transcribe StreamingGoogle Streaming ASR
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 NativeSafariWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeWeb
SummaryPicovoice PorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeSafariWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice CobraWebRTC VADSilero VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Orca Streaming Text-to-Speech
.NET API

API Reference for the Orca .NET SDK (NuGet)


namespace: Pv


Orca.Create()

public static Orca Create(
string accessKey,
string device = null,
string modelPath = null)

Factory method for Orca Streaming Text-to-Speech engine.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • modelPath string : Absolute path to the file containing model parameters (.pv). This file determines the voice of the synthesized speech.
  • device string : String representation of the device (e.g., CPU or GPU) to use. If set to best, the most suitable device is selected automatically. If set to gpu, the engine uses the first available GPU device. To select a specific GPU device, set this argument to gpu:${GPU_INDEX}, where ${GPU_INDEX} is the index of the target GPU. If set to cpu, the engine will run on the CPU with the default number of threads. To specify the number of threads, set this argument to cpu:${NUM_THREADS}, where ${NUM_THREADS} is the desired number of threads.

Returns

  • Orca : An instance of the Orca Streaming Text-to-Speech engine.

Throws

  • OrcaException

Orca.GetAvailableDevices()

public static string[] GetAvailableDevices()

Retrieves a list of hardware devices that can be specified when constructing Orca.

Returns

  • string[]: An array of available hardware devices.

Throws

  • OrcaException: If an error occurs while retrieving the hardware devices.

Orca

public class Orca : IDisposable { }

Class for the Orca Streaming Text-to-Speech engine. Orca can be initialized either using the module level create() function.


Orca.Version

public string Version { get; private set; }

The version string of the Orca library.


Orca.ValidCharacters

public string[] ValidCharacters { get; private set; }

The set of valid characters that Orca accepts in the text input to the synthesis methods.


Orca.SampleRate

public int SampleRate { get; private set; }

The audio sample rate of the synthesized speech.


Orca.MaxCharacterLimit

public int MaxCharacterLimit { get; private set; }

The maximum number of characters allowed in a single synthesis request.


Orca.Dispose()

public void Dispose()

Releases resources acquired by Orca.


Orca.Synthesize()

public OrcaAudio Synthesize(
string text,
float? speechRate = null,
long? randomState = null)

Generates audio from text. The returned audio contains the speech representation of the text.

If you wish to save the synthesized speech to a file, consider using Orca.SynthesizeToFile().

Parameters

  • text string : Text to be converted to audio. The maximum number of characters per call is MaxCharacterLimit. Allowed characters can be retrieved by calling ValidCharacters. Custom pronunciations can be embedded in the text via the syntax "{word|pronunciation}". The pronunciation is expressed in ARPAbet phonemes, for example: "{read|R IY D} this as {read|R EH D}".
  • speechRate float? : Speed of generated speech. Valid values are within [0.7, 1.3]. Higher (lower) values produce faster (slower) speech. The default is 1.0.
  • randomState long?: Random seed for the synthesis process. This can be used to ensure that the synthesized speech is deterministic across different runs. Valid values are all non-negative integers. If not provided, a random seed will be chosen and the synthesis process will be non-deterministic.

Returns

  • OrcaAudio: Synthesized audio and word alignment metadata.

Throws

  • OrcaException

Orca.SynthesizeToFile()

public OrcaWord[] SynthesizeToFile(
string text,
string outputPath,
float? speechRate = null,
long? randomState = null)

Generates audio from text and saves it to a WAV file. The file contains the speech representation of the text.

Parameters

  • text string : Text to be converted to audio. The maximum number of characters per call is MaxCharacterLimit. Allowed characters can be retrieved by calling ValidCharacters. Custom pronunciations can be embedded in the text via the syntax "{word|pronunciation}". The pronunciation is expressed in ARPAbet phonemes, for example: "{read|R IY D} this as {read|R EH D}".
  • outputPath string : Absolute path to save the generated audio as a single-channel 16-bit PCM WAV file.
  • speechRate float? : Speed of generated speech. Valid values are within [0.7, 1.3]. Higher (lower) values produce faster (slower) speech. The default is 1.0.
  • randomState long?: Random seed for the synthesis process. This can be used to ensure that the synthesized speech is deterministic across different runs. Valid values are all non-negative integers. If not provided, a random seed will be chosen and the synthesis process will be non-deterministic.

Returns

  • OrcaWord[]: Array of synthesized words with their associated metadata.

Throws

  • OrcaException

Orca.StreamOpen()

public OrcaStream StreamOpen(
float? speechRate = null,
long? randomState = null)

Opens an Orca.OrcaStream object for streaming input text synthesis.

Parameters

  • speechRate float? : Speed of generated speech. Valid values are within [0.7, 1.3]. Higher (lower) values produce faster (slower) speech. The default is 1.0.
  • randomState long?: Random seed for the synthesis process. This can be used to ensure that the synthesized speech is deterministic across different runs. Valid values are all non-negative integers. If not provided, a random seed will be chosen and the synthesis process will be non-deterministic.

Returns

  • Orca.OrcaStream : An instance of Orca.OrcaStream.

Throws

  • OrcaException

Orca.OrcaStream

public class OrcaStream : IDisposable

Class for the Orca OrcaStream object for input text streaming synthesis.

An Orca.OrcaStream object is initialized via the Orca.StreamOpen().


Orca.OrcaStream.Synthesize()

public short[] Synthesize(string text)

Adds a chunk of text to the Orca.OrcaStream object and generates audio if enough text has been added. This function is expected to be called multiple times with consecutive chunks of text from a text stream. The incoming text is buffered as it arrives until there is enough context to convert a chunk of the buffered text into audio. The caller needs to use Orca.OrcaStream.Flush() to generate the audio chunk for the remaining text that has not yet been synthesized.

Parameters

  • text string : A chunk of text (e.g. an LLM token) from a text input stream, comprised of valid characters. For details see the documentation of Orca.Synthesize().

Returns

  • short[]: The generated audio as a sequence of 16-bit linearly-encoded integers, null if no audio chunk has been produced.

Throws

  • OrcaException

Orca.OrcaStream.Flush()

public short[] Flush()

Generates audio for all the buffered text that was added to the Orca.OrcaStream object via Orca.OrcaStream.Synthesize().

Returns

  • short[]: The generated audio as a sequence of 16-bit linearly-encoded integers, null if no audio chunk has been produced.

Throws

  • OrcaException

Orca.OrcaStream.Dispose()

public void Dispose()

Closes the Orca.OrcaStream object and releases resources acquired by it.


OrcaAudio

public class OrcaAudio

Class that contains audio and word alignments returned by Orca's synthesize function.

Parameters

  • Pcm short[] : Synthesized speech.
  • Words OrcaWord[] : Word alignment metadata.

OrcaPhoneme

public class OrcaPhoneme

Class representing a phoneme synthesized by Orca and its associated metadata.

Parameters

  • Phoneme str : Synthesized phoneme.
  • StartSec float : Start time of the phoneme in seconds.
  • EndSec float : End time of the phoneme in seconds.

OrcaWord

public class OrcaWord

Class representing a word synthesized by Orca and its associated metadata.

Parameters

  • Word String : Synthesized word.
  • StartSec float : Start of word in seconds.
  • EndSec float : End of word in seconds.
  • Phonemes OrcaPhoneme[] : Synthesized phonemes and their associated metadata.

OrcaException

class OrcaException(Exception)

Error thrown if an error occurs within the Orca Text-to-Speech engine.

Exceptions

class OrcaActivationException(OrcaException)
class OrcaActivationLimitException(OrcaException)
class OrcaActivationRefusedException(OrcaException)
class OrcaActivationThrottledException(OrcaException)
class OrcaIOException(OrcaException)
class OrcaInvalidArgumentException(OrcaException)
class OrcaInvalidStateException(OrcaException)
class OrcaKeyException(OrcaException)
class OrcaMemoryException(OrcaException)
class OrcaRuntimeException(OrcaException)
class OrcaStopIterationException(OrcaException)

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Orca Streaming Text-to-Speech .NET API
  • Orca.Create()
  • GetAvailableDevices()
  • Orca
  • Version
  • ValidCharacters
  • SampleRate
  • MaxCharacterLimit
  • Dispose()
  • Synthesize()
  • SynthesizeToFile()
  • StreamOpen()
  • Orca.OrcaStream
  • Synthesize()
  • Flush()
  • Dispose()
  • OrcaAudio
  • OrcaPhoneme
  • OrcaWord
  • OrcaException
Voice AI
  • picoLLM On-Device LLM
  • 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
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.