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

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 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.

Returns

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

Throws

  • OrcaException

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.Vesion

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 OrcaWord

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()
  • Orca
  • Vesion
  • ValidCharacters
  • SampleRate
  • MaxCharacterLimit
  • Dispose()
  • Synthesize()
  • SynthesizeToFile()
  • StreamOpen()
  • Orca.OrcaStream
  • Synthesize()
  • Flush()
  • Dispose()
  • OrcaAudio
  • OrcaPhoneme
  • OrcaWord
  • OrcaException
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.