Skip to content

Android: Date, time, numbers lack control of readback details #30849

@amarlette

Description

@amarlette

Description

Formatting for date, time, numbers lack of any way to specify the type of content presented for the TTS engine. Without some sort of metadata, TTS engines will do their best to guess as to what to announce, which often is incorrect. For example 10m might be 10 minutes, 10 meters, or 10 miles.

React Native version:

v0.63

Expected Behavior

An implementor should be able to specify the type of content within a span of text to give additional context to the TTS engine. This context should be take into account when announcing this content.

Snack

https://snack.expo.io/p4tHQ-QOj

Android Details

On Android, the TTSSpan class is meant to give extra metadata to text-to-speech engines about the type of content. This class includes various options for things like numbers, distances, time, etc. These should be available as an option on the component so that you can specify the type of content this text is meant to represent.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions