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

feat/sentence_tokenize_before_TTS #206

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Conversation

JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented Jan 3, 2024

split large responses into sub-sentences, this improves the TTS synth speed

eg, with this PR the sentence below would have been 3 synths instead of 1, and the first one would start playing while it synthed the next 2

Jan 03 14:55:37 rpi4b hivemind-voice-sat[10648]: 2024-01-03 14:55:37.257 - HiveMind-voice-sat - ovos_audio.service:execute_tts:348 - INFO - Speak: Quantum computing is a field that focuses on developing computer systems that utilize the principles of quantum mechanics. These systems, known as quantum computers, use quantum bits or qubits to process and store information. Unlike classical computers which use bits that can represent either a 0 or a 1, qubits can exist in multiple states simultaneously, thanks to a property called superposition. This allows quantum computers to perform certain calculations much faster than classical computers, potentially enabling breakthroughs in fields like cryptography, optimization, and molecular simulations. However, quantum computing is still a developing field and many practical challenges need to be overcome before fully functional quantum computers become widely available.

ChatGPT answered quickly but the TTS server took some time to convert it. It took about 20 seconds with ryan-high on Piper, sure it will be faster with a lower voice but still an issue

split large responses into sub-sentences, this improves the TTS synth speed

eg, with this PR the sentence below would have been 3 synths instead of 1, and the first one would start playing while it synthed the next 2

> Jan 03 14:55:37 rpi4b hivemind-voice-sat[10648]: 2024-01-03 14:55:37.257 - HiveMind-voice-sat - ovos_audio.service:execute_tts:348 - INFO - Speak: Quantum computing is a field that focuses on developing computer systems that utilize the principles of quantum mechanics. These systems, known as quantum computers, use quantum bits or qubits to process and store information. Unlike classical computers which use bits that can represent either a 0 or a 1, qubits can exist in multiple states simultaneously, thanks to a property called superposition. This allows quantum computers to perform certain calculations much faster than classical computers, potentially enabling breakthroughs in fields like cryptography, optimization, and molecular simulations. However, quantum computing is still a developing field and many practical challenges need to be overcome before fully functional quantum computers become widely available.


ChatGPT answered quickly but the TTS server took some time to convert it. It took about 20 seconds with ryan-high on Piper, sure it will be faster with a lower voice but still an issue
@JarbasAl JarbasAl added the enhancement New feature or request label Jan 3, 2024
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (dev@858cea8). Click here to learn what that means.

Additional details and impacted files
@@          Coverage Diff          @@
##             dev    #206   +/-   ##
=====================================
  Coverage       ?   0.00%           
=====================================
  Files          ?      57           
  Lines          ?    4001           
  Branches       ?       0           
=====================================
  Hits           ?       0           
  Misses         ?    4001           
  Partials       ?       0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JarbasAl JarbasAl merged commit 79f71e0 into dev Jan 3, 2024
10 checks passed
@JarbasAl JarbasAl deleted the feat/sentence_tokenize_before_TTS branch January 3, 2024 20:16
@JarbasAl
Copy link
Member Author

JarbasAl commented Jan 3, 2024

confirmed working by @goldyfruit

INFO:     10.233.75.21:41764 - "GET /v2/synthesize?lang=en-us&voice=ryan-high&utterance=Quantum+computing+is+a+field+within+computer+science+that+explores+how+to+harness+the+principles+of+quantum+mechanics+to+create+more+powerful+and+efficient+computers. HTTP/1.1" 200 OK
INFO:     10.233.75.21:41764 - "GET /v2/synthesize?lang=en-us&voice=ryan-high&utterance=Unlike+traditional+computers%2C+which+use+bits+to+represent+information+as+either+a+0+or+a+1%2C+quantum+computers+use+quantum+bits+%28qubits%29+which+can+represent+both+0+and+1+simultaneously. HTTP/1.1" 200 OK
Missing phoneme from id map: ̩
INFO:     10.233.75.21:51364 - "GET /v2/synthesize?lang=en-us&voice=ryan-high&utterance=This+allows+quantum+computers+to+perform+certain+calculations+much+faster+than+classical+computers%2C+potentially+solving+complex+problems+in+fields+like+cryptography%2C+optimization%2C+and+simulation. HTTP/1.1" 200 OK

@github-actions github-actions bot mentioned this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant