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
164 stars 41 forks source link

fix: check end_conversation.txt when waiting for text input #242

Closed jordanbtucker closed 4 months ago

jordanbtucker commented 4 months ago

This PR resolves an issue where Mantella hangs when waiting for text input when the player has already ended the conversation.

Instead of calling GameStateManager.load_data_when_available, Transcriber has a new function _get_text_input that polls both _mantella_text_input.txt and _mantella_end_conversation.txt to ensure that it doesn't end up in an endless loop.

I also fixed an instance where _mantella_end_conversation.txt was being checked for the value true without first converting it to lower case.

I've only tested this fix with Skyrim and Skyrim VR but not with Fallout 4 or Fallout 4 VR.

Fixes #241