Skip to content

Commit

Permalink
Fix changing language while transcribing. (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiidams authored Oct 22, 2023
1 parent 4b54653 commit d01fd51
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Examples/Godot/Demo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,23 @@ private void _ChangeLanguage(string language)
{
GD.Print(string.Format("Language={0}", language));

_speaking = false;
_transcribing = false;
if (_transcribing)
{
_transcribing = false;
_microphone.Stop();
}
if (_speaking)
{
_speaking = false;
}

_languageMenu.Text = language;
_language = language;

_modelNames = _GetModelList();
if (_CheckAllCacheFile())
{
_loadingIndex = _modelNames.Length;
_ModelsDownloaded();
}
else
Expand Down

0 comments on commit d01fd51

Please sign in to comment.