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

Audio Recording
iOS Quick Start

Platforms

  • iOS (11.0+)

Requirements

  • Xcode
  • Swift Package Manger or CocoaPods

Quick Start

Setup

  1. Install Xcode.

  2. Import the ios-voice-processor package into your project.

To import the package using SPM, open up your project's Package Dependencies in XCode and add:

https://github.com/Picovoice/ios-voice-processor.git

To import it into your iOS project using CocoaPods, add the following line to your Podfile:

pod 'ios-voice-processor'
  1. Run the following from the project directory:
pod install
  1. Add the following to the app's Info.plist file to enable recording with your iOS device's microphone
<key>NSMicrophoneUsageDescription</key>
<string>[Permission explanation]</string>

Usage

Check if you have permission to record audio and request permission if needed:

guard VoiceProcessor.hasRecordAudioPermission else {
VoiceProcessor.requestRecordAudioPermission { granted in
if granted {
// permission granted
} else {
// permission denied
}
}
}

Access the singleton instance of VoiceProcessor:

import ios_voice_processor
let voiceProcessor = VoiceProcessor.instance

Add listeners for audio frames and errors:

let frameListener = VoiceProcessorFrameListener { frame in
// use audio data
}
let errorListener = VoiceProcessorErrorListener { error in
// handle error
}
voiceProcessor.addFrameListener(frameListener);
voiceProcessor.addErrorListener(errorListener);

Start audio capture with the desired frame length and audio sample rate:

try voiceProcessor.start(frameLength: 512, sampleRate: 16000)

Stop audio capture:

try voiceProcessor.stop();

Once audio capture has started successfully, any frame listeners assigned to the VoiceProcessor will start receiving audio frames with the given frameLength and sampleRate.

Capturing with Multiple Listeners

Any number of listeners can be added to and removed from the VoiceProcessor instance. However, the instance can only record audio with a single audio configuration (frameLength and sampleRate), which all listeners will receive once a call to start() has been made. To add multiple listeners:

let listener1 = VoiceProcessorFrameListener({_ in })
let listener2 = VoiceProcessorFrameListener({_ in })
let listeners: [VoiceProcessorFrameListener] = [listener1, listener2];
voiceProcessor.addFrameListeners(listeners);
voiceProcessor.removeFrameListeners(listeners);
// or
voiceProcessor.clearFrameListeners();

Demo

For the Voice Processor iOS SDK we have an example app that demonstrates how to use VoiceProcessor in an iOS app.

Setup

Clone the ios-voice-processor repository from GitHub:

git clone https://github.com/Picovoice/ios-voice-processor.git

Usage

  1. Install dependencies and setup environment:
cd example
pod install
  1. Open the generated ios-voice-processor.xcworkspace and run the demo with a simulator or connected iOS device.

  2. Toggle recording on and off with the button in the center of the screen. While recording, the VU meter on the screen will respond to the volume of incoming audio.

For more information on our Voice Processor demo for iOS, head over to our GitHub repository.

Resources

Package

  • ios-voice-processor on the Cocoapods

API

  • ios-voice-processor API Docs

GitHub

  • Voice Processor iOS SDK on GitHub
  • Voice Processor iOS Demo on GitHub

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Audio Recording iOS Quick Start
  • Platforms
  • Requirements
  • Quick Start
  • Setup
  • Usage
  • Capturing with Multiple Listeners
  • Demo
  • 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.