art-from-the-machine / Mantella

Mantella is a Skyrim and Fallout 4 mod which allows you to naturally speak to NPCs using Whisper (speech-to-text), LLMs (text generation), and xVASynth / XTTS (text-to-speech).
https://art-from-the-machine.github.io/Mantella/
GNU General Public License v3.0
153 stars 38 forks source link

Stop treating ellipsis as the end of a sentence #275

Open art-from-the-machine opened 2 months ago

art-from-the-machine commented 2 months ago

When the LLM streams a response in src/output_manager.py, sentences are split based on symbols which indicate the end of a sentence (".", "!", "?" etc). However, when the LLM uses ellipsis, sentences are split at an awkward position. For example:

"I've been thinking... what if XYZ?"

When a line like the above plays in game, the time between delivered voicelines can be awkwardly long. Ellipsis should instead be treated as (or converted to?) a comma so that these voicelines are delivered as one line rather than being split into two.