Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving TTS Project #1078

Open
30 of 32 tasks
kevmo314 opened this issue Oct 9, 2023 · 0 comments
Open
30 of 32 tasks

Improving TTS Project #1078

kevmo314 opened this issue Oct 9, 2023 · 0 comments
Assignees

Comments

@kevmo314
Copy link
Contributor

kevmo314 commented Oct 9, 2023

This is going to be a project to overhaul how TTS works in RealtimeChat. Today, it works by attempting to keep the main activity alive while the active channel is streaming. This comes with some complications, namely:

  • It's hard to keep that activity alive
  • It's battery intensive since the activity runs other things
  • It's hard to ensure message parity since the message history fetches things that should not be read
  • TTS logic is intermingled with other logic
  • It's not so easy to use native APIs to customize TTS voices as we are reliant on third-party packages, so we run into issues like this: [tts] tts does not work when app is in the background on ios #388

This project will have four components:

  1. The iOS TTS engine
  2. The Android TTS engine
  3. The TTS circular buffer
  4. The TTS isolate

The Android and iOS TTS engines will have the same Dart APIs following:

class Engine:
  getLanguages(): string[]
  getVoices(languageId: string): string[]
  speak({ text: string, languageId: string, voiceId: string }): Promise<void>
  stop() // immediately stop speaking

Milestone 5: Migrating the new TTS system

  1. jessielw
  2. jessielw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants