TomTomSDKTextToSpeech
TomTomSDKTextToSpeech
The Text To Speech module provides voice synthesis functionality for generating audible messages within navigation applications. This module enhances the Navigation feature by providing users with clear and engaging voice instructions, thereby enriching their overall navigation experience.
Functionalities
- Voice Synthesis: The module synthesizes speech from text messages, enabling the generation of voice instructions that guide users during navigation.
- Default TTS Engine Integration: The module can utilize the SystemTextToSpeechEngine engine, which is based on AVSpeechSynthesizer. This default implementation provides a reliable and straightforward way to integrate TTS functionality into applications.
- Custom TTS Engine Support: Developers can optionally define a custom TTS engine for text-to-speech conversion. Any custom engine must conform to the TextToSpeechEngineDelegate interface, enabling for tailored voice synthesis that meets specific application requirements.
For more detailed examples and use cases, refer to the following documentation:
API Overview
The following declarations are provided by module TomTomSDKTextToSpeech.
-
Creates a
TextToSpeechobject using a specifiedTextToSpeechEngine.Initializes a
TextToSpeechobject by providing an implementation of theTextToSpeechEngineprotocol. This enables the text-to-speech system to convert text into speech using the specified engine.Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public func makeTextToSpeech(ttsEngine: TextToSpeechEngine) -> TextToSpeechParameters
ttsEngineThe text-to-speech engine to be used. It must conform to the
TextToSpeechEngineprotocol and be properly configured.Return Value
A
TextToSpeechinstance initialized with the providedTextToSpeechEngine. -
Provides predefined alphabet codes used in phonetic transcriptions.
The
DefaultPhoneticAlphabetscontains predefined alphabet codes that are commonly used in phonetic transcriptions such as the International Phonetic Alphabet (IPA) code. These codes assist in the consistent representation of phonetic data.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct DefaultPhoneticAlphabets -
Provides predefined tags used in the verbal messages.
Offers a set of standard tags that can be used in conjunction with verbal messages within the SDK. These tags help in identifying and formatting specific parts of the messages, such as street names or road signs.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct DefaultTags -
Defines the priority level and timeout of a text-to-speech message. The purpose is to help manage and prioritize messages in a queue.
These parameters are used to establish both the priority and duration that a message remains in the queue before processing. Lower priority values indicate higher importance. Use this struct to prioritize the processing of critical messages over less important ones, potentially timing out the latter when necessary.
See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public struct TTSMessagePriority -
Manages the TTS (Text-To-Speech) engine. Provides functionality for changing the engine, setting the language, playing messages, stopping playback, and adjusting volume.
The
TextToSpeechprotocol is essential for applications that require text-to-speech capabilities. It enables dynamic replacement of the TTS engine, adjustment of the spoken language, prioritization of messages, playback control, and speech volume configuration.See moreImportant
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public protocol TextToSpeech : AnyObject
TomTom SDK for iOS (0.71.1)
TomTomSDKTextToSpeech