Support word events in Android tts voices

Tested with:

1. Android Google tts. Word events (aka onRangeStart), is supported by
the engine.

2. ETI Eloquence (3p engine); this engine does not support word
events. Verify the Chrome side voice never gets the word event(s) and
its voice data never gets "word".

Example js interaction with Android Google tts voice:
before = new Date(); chrome.tts.speak('hi, this is a test', {onEvent: e=>console.log((new Date() - before) + JSON.stringify(e))})
"54{"type":"start","charIndex":0}"
"100{"type":"word","charIndex":0,"length":2}"
"474{"type":"word","charIndex":4,"length":4}"
"599{"type":"word","charIndex":9,"length":2}"
"649{"type":"word","charIndex":12,"length":1}"
"671{"type":"word","charIndex":14,"length":4}"
"1315{"type":"end","charIndex":18}"

(this matches the same test when done on the same CHrome OS Google tts voice).

R=hirokisato@chromium.org

Test: manual
Bug: n/a
Change-Id: I3e859c850a53cdcc9840e979191df3d46ffc7979
AX-Relnotes: in Chrome OS, when using a text-to-speech voice from Android, supports word-related events. This makes it possible to get word highlighting in Select to Speak when using one of these voices, if it supports word events.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2713562
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: Hiroki Sato <hirokisato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#857029}
GitOrigin-RevId: 8def3a16a74d970eaffaa2be717c6b1099d1ce7b
1 file changed
tree: a20a0d29ae05899026af112c86dfaafd4bff74e1
  1. accessibility_helper.mojom
  2. adbd.mojom
  3. app.mojom
  4. app_mojom_traits.h
  5. app_permissions.mojom
  6. appfuse.mojom
  7. arc_bridge.mojom
  8. arc_gfx_mojom_traits.cc
  9. arc_gfx_mojom_traits.h
  10. ARC_SECURITY_OWNERS
  11. audio.mojom
  12. auth.mojom
  13. backup_settings.mojom
  14. bitmap.mojom
  15. bluetooth.mojom
  16. boot_phase_monitor.mojom
  17. BUILD.gn
  18. camera.mojom
  19. camera_intent.mojom
  20. cast_receiver.mojom
  21. cert_store.mojom
  22. clipboard.mojom
  23. crash_collector.mojom
  24. digital_goods.mojom
  25. disk_quota.mojom
  26. enterprise_reporting.mojom
  27. file_system.mojom
  28. gfx.mojom
  29. iio_sensor.mojom
  30. ime.mojom
  31. ime_mojom_traits.cc
  32. ime_mojom_traits.h
  33. ime_mojom_traits_unittest.cc
  34. input_method_manager.mojom
  35. intent_common.mojom
  36. intent_helper.mojom
  37. keymaster.mojom
  38. kiosk.mojom
  39. lock_screen.mojom
  40. media_session.mojom
  41. metrics.mojom
  42. midis.mojom
  43. net.mojom
  44. notifications.mojom
  45. obb_mounter.mojom
  46. oemcrypto.mojom
  47. OWNERS
  48. payment_app.mojom
  49. pip.mojom
  50. policy.mojom
  51. power.mojom
  52. print_common.mojom
  53. print_mojom_traits.cc
  54. print_mojom_traits.h
  55. print_spooler.mojom
  56. process.mojom
  57. property.mojom
  58. protected_buffer_manager.mojom
  59. rotation_lock.mojom
  60. scale_factor.mojom
  61. screen_capture.mojom
  62. sensor.mojom
  63. sensor_service.mojom
  64. sharesheet.mojom
  65. storage_manager.mojom
  66. timer.mojom
  67. tracing.mojom
  68. tts.mojom
  69. usb_host.mojom
  70. video.mojom
  71. video_accelerator_mojom_traits.cc
  72. video_accelerator_mojom_traits.h
  73. video_accelerator_mojom_traits_unittest.cc
  74. video_common.mojom
  75. video_decode_accelerator.mojom
  76. video_encode_accelerator.mojom
  77. video_encode_accelerator_mojom_traits.cc
  78. video_encode_accelerator_mojom_traits.h
  79. video_protected_buffer_allocator.mojom
  80. voice_interaction_arc_home.mojom
  81. voice_interaction_framework.mojom
  82. volume_mounter.mojom
  83. wake_lock.mojom
  84. wallpaper.mojom