Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
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
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeSafariWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidArduinoC.NETiOSLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSMicrocontrollerNode.jsPythonWeb
SummaryPicovoice CobraWebRTC VADSilero VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Zebra Translate
iOS API

API Reference for the Zebra iOS SDK (Cocoapod)


Zebra

public class Zebra { }

Class for the Zebra Translate engine. Resources should be cleaned when you are done using the delete() function.


Zebra.getAvailableDevices()

public static func getAvailableDevices() throws -> [String]

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

Returns

  • [String] : An array of available devices.

Throws

  • ZebraError: If an error occurs while retrieving the devices.

Zebra.init()

init method for Zebra Translate engine.

public init(
accessKey: String,
modelPath: String? = nil,
device: String? = nil) throws -> Zebra

Parameters

  • accessKey String : The AccessKey obtained from Picovoice Console.
  • modelPath String? : Absolute path to file containing model parameters (.pv). Sets the source and target translation languages.
  • 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.

Throws

  • ZebraError: If an error occurs while creating an instance of Zebra Translate engine.

Zebra.delete()

Releases resources acquired by the Zebra engine.

public func delete()

Zebra.translate()

Translates text. The maximum number of characters that can be translated at once is given by .maxCharacterLimit.

public func translate(text: String) throws -> String

Parameters

  • text String : Text to translate.

Returns

  • String : Translated text.

Throws

  • ZebraError: If there is an error while translating.

Zebra.version

public static let version: String

Current Zebra version.


Zebra.maxCharacterLimit

public var maxCharacterLimit: Int32

Maximum number of characters allowed in a single translation request.


ZebraError

public class ZebraError : LocalizedError { }

Error thrown if an error occurs within Zebra Translate engine.

public class ZebraMemoryError : ZebraError {}
public class ZebraIOError : ZebraError {}
public class ZebraInvalidArgumentError : ZebraError {}
public class ZebraStopIterationError : ZebraError {}
public class ZebraKeyError : ZebraError {}
public class ZebraInvalidStateError : ZebraError {}
public class ZebraRuntimeError : ZebraError {}
public class ZebraActivationError : ZebraError {}
public class ZebraActivationLimitError : ZebraError {}
public class ZebraActivationThrottledError : ZebraError {}
public class ZebraActivationRefusedError : ZebraError {}

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Zebra Translate iOS API
  • Zebra
  • getAvailableDevices()
  • init()
  • delete()
  • translate()
  • version
  • maxCharacterLimit
  • ZebraError
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.