Skip to content

Latest commit

 

History

History
79 lines (50 loc) · 2.91 KB

tts.md

File metadata and controls

79 lines (50 loc) · 2.91 KB

Text to Speech in Chrome and Chrome OS

Chrome and Chrome OS allow developers to produce synthesized speech. This document is an overview of the relevant code and code structure around synthesized speech.

Code structure

A brief outline of the flow from speech request to the resulting speech on any platform.

Input

Processing

  • The TtsControllerImpl (in content/) processes utterances and sends them to the correct output engine.

  • The TtsControllerDelegateImpl (in chrome/) provides chrome-specific functionality, including making use of user prefs in Chrome OS.

Output

  • May differ by system, including Mac, Wind, Android, Arc++, and Chrome OS

  • In Chrome OS:

    • TtsEngineExtensionAPI forwards speech events to PATTS, or the network speech engine, or, coming soon, third-party speech engines.

    • PATTS is the built-in Chrome OS text-to-speech engine.

Testing

  • Unit tests

    • TtsControllerUnittest in content/browser/speech

    • TtsControllerDelegateImplUnittest in chrome/browser/speech

    • ArcTtsServiceUnittest for ARC++ voices

  • Browser tests

    • TtsApiTest tests Chrome TTS extension APIs
  • Fuzzer

    • In content_unittests, content/browser/speech/tts_platform_fuzzer.cc (currently Windows only).