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 Quick Start

Platforms

  • Linux (x86_64)
  • macOS (x86_64, arm64)
  • Windows (x86_64, arm64)
  • Raspberry Pi (3, 4, 5)

Requirements

  • Picovoice Account & AccessKey

.NET Framework 4.6.1+ / .NET Standard 2.0+ / .NET Core 3.0+:

  • Windows (x86_64)

.NET Standard 2.0+ / .NET Core 3.0+:

  • macOS (x86_64)

.NET 6.0+:

  • macOS (arm64)
  • Windows (arm64)
  • Linux (x86_64)
  • Raspberry Pi (3, 4, 5)

Picovoice Account & AccessKey

Signup or Login to Picovoice Console to get your AccessKey. Make sure to keep your AccessKey secret.

Quick Start

Setup

  1. Install .NET.

  2. Install the Orca Text-to-Speech NuGet package in Visual Studio or using the .NET CLI:

dotnet add package Picovoice.Orca

Usage

Create an instance of the Orca engine:

using Pv;
const string accessKey = "${ACCESS_KEY}"; // Obtained from the Picovoice Console (https://console.picovoice.ai/)
Orca orca = Orca.Create(accessKey);

Orca supports two modes of operation: streaming and single synthesis. In the streaming synthesis mode, Orca processes an incoming text stream in real-time and generates audio in parallel. In the single synthesis mode, a complete text is synthesized in a single call to the Orca engine.

Streaming synthesis

To synthesize a text stream, create an Orca.OrcaStream object and add text chunks to it one-by-one:

Orca.OrcaStream stream = orca.StreamOpen();
foreach (string textChunk in TextGenerator())
{
short[] streamPcm = orcaStream.Synthesize(textChunk);
if (streamPcm != null)
{
// handle pcm chunk
}
}

The TextGenerator() function can be any stream generating text, such as an LLM response.

The Orca.OrcaStream object buffers input text until there is enough context to generate audio. If there is not enough text to generate audio, null is returned.

Once the text stream is complete, call the Flush method to synthesize the remaining text:

short[] flushPcm = orcaStream.Flush();
if (flushPcm != null)
{
// handle final pcm chunk
}

OrcaStream implements IDisposable, so you either call .Dispose() to close it or wrap it in a using statement:

using(Orca.OrcaStream stream = orca.StreamOpen())
{
// .. OrcaStream usage here
}

Single synthesis

Synthesize speech with a single call to one of the Orca.Synthesize methods:

// Return raw audio data (PCM) and alignments
OrcaAudio res = orca.Synthesize("${TEXT}");
// Save the generated audio to a WAV file directly and just return alignments
OrcaWord[] alignments = orca.SynthesizeToFile("${TEXT}", "${OUTPUT_PATH}");

Orca will have its resources freed by the garbage collector, but to have resources freed immediately after use, wrap it in a using statement:

using(Orca orca = Orca.Create(accessKey))
{
// .. Orca usage here
}

For more information on our Orca .NET SDK, head over to our Orca GitHub repository.

Model File

Orca Streaming Text-to-Speech can synthesize speech in different languages and with a variety of voices, each of which is characterized by a model file (.pv) located in the Orca GitHub repository. The language and gender of the speaker is indicated in the file name.

To create an instance of the engine with a specific language/voice, use:

Orca orca = Orca.Create(accessKey, "${MODEL_PATH}");

and replace ${MODEL_PATH} with the path to the model file with the desired language/voice.

Demos

For the Orca .NET SDK, we offer a demo application that demonstrates how to use the Text-to-Speech engine.

Setup

  1. Clone the Orca Text-to-Speech repository from GitHub:
git clone https://github.com/Picovoice/orca.git
  1. Build the demos:
cd orca/demo/dotnet/OrcaDemo
dotnet build -c StreamingDemo.Release
dotnet build -c FileDemo.Release

Usage

Use the --help flag to see the usage options for the demos, e.g.:

dotnet run -c StreamingDemo.Release -- --help

Streaming synthesis demo

This demo showcases how Orca processes an incoming text stream in real-time and generates audio in parallel. The synthesized audio is played as soon as it is generated.

dotnet run -c StreamingDemo.Release -- --access_key ${ACCESS_KEY} --text_to_stream ${TEXT}

Single synthesis demo

To synthesize a text and save it to a WAV file, run the following:

dotnet run -c FileDemo.Release -- --access_key ${ACCESS_KEY} --text ${TEXT} --output_path ${WAV_OUTPUT_PATH}

For more information on our Orca demo for .NET, head over to our GitHub repository.

Resources

Package

  • Picovoice.Orca on NuGet

API

  • Picovoice.Orca .NET API Docs

GitHub

  • Orca Text-to-Speech .NET SDK on GitHub
  • Orca Text-to-Speech .NET Demos on GitHub

Benchmark

  • Text-to-Speech Benchmark

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Orca Streaming Text-to-Speech .NET Quick Start
  • Platforms
  • Requirements
  • Picovoice Account & AccessKey
  • Quick Start
  • Setup
  • Usage
  • Model File
  • Demos
  • Setup
  • Usage
  • Resources
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.