🚴
COBI.Bike
  • Introduction
  • Getting up and running
  • Namespaces
    • App
      • Theme
      • Text to Speech
      • Read Later
      • Language
      • Contact
      • Touch Interaction Enabled
      • Hub Location
      • Clock Visible
      • Is Dark
      • Is Hub Connected
    • Parameters
      • Language
      • Context
      • SDK Version
    • Hub
      • Motor Interface Ready
      • Bell Ringing
      • External Interface Action
      • Ambient Light State
    • Battery
      • State
    • Battery Two
      • State
    • Battery Controller
      • Slots
      • State
    • Motor
      • Serialnumber
      • Distance
      • Assistance Indicator
      • Range
      • Supported Drive Modes
      • Drive mode
      • Next Service
      • Power On Time
    • Mobile
      • Location
      • Heading
      • Location Availability
    • Navigation Service
      • Route
      • Eta
      • Distance To Destination
      • Status
      • Control
    • User
      • Temperature Unit
      • Length Unit
    • Bike
      • Type
    • Ride Service
      • Speed
      • User Power
      • User Power Availability
      • Heart Rate
      • Heart Rate Availability
      • Cadence
      • Cadence Availability
    • Tour Service
      • Calories
      • Ascent
      • Riding Distance
      • Riding Duration
      • Average Speed
    • Devkit
      • Override ThumbController Mapping
  • Entities
    • Theme
    • RgbColor
    • TextToSpeechContent
    • ReadLaterItem
    • ContactData
    • ExternalInterfaceAction
    • AmbientLightState
    • BatteryCondition
      • BatteryState
    • BatterySlots
    • ServiceTrigger
    • Location
    • Coordinate
    • Route
    • NavigationStatus
    • NavigationCommand
      • NavigationAction
    • TemperatureUnit
    • MeasurementUnit
    • BikeType
    • Placemark
      • PlacemarkCategory
Powered by GitBook
On this page
  1. Namespaces
  2. App

Text to Speech

PreviousThemeNextRead Later

Last updated 2 years ago

Let the phone speak out the provided text using the built in text to speech engine. The language parameter is ignored for now and the system language is used.

const onTextToSpeechCallback = (response: TextToSpeechContent, timestamp?: Date) => {
    console.log(response, timestamp);
};


const request: TextToSpeechContent = {
    content: 'Hello World',
    language: 'en-US'
};

COBI.app.textToSpeech.write(request, onTextToSpeechCallback);
const onTextToSpeechCallback = (response, timestamp) => {
    console.log(response, timestamp);
};


const request = {
    content: 'Hello World',
    language: 'en-US'
};

COBI.app.textToSpeech.write(request, onTextToSpeechCallback);
Example Response
{
    "content": "Hello World",
    "language": "en-US"
}
TextToSpeechContent