diff options
author | Grail Finder <wohilas@gmail.com> | 2025-06-17 07:34:13 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-06-17 07:34:13 +0300 |
commit | e4b8a89f25b1dd2a6ab7a29471e88522c0b08148 (patch) | |
tree | f9c734cd148e29bc09e55af1a24705b6378641bb /extra/stt.go | |
parent | 5a489211ef184a62f5ed81dd8f742f340ec794e9 (diff) |
Diffstat (limited to 'extra/stt.go')
-rw-r--r-- | extra/stt.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extra/stt.go b/extra/stt.go index cd9e82e..ce107b4 100644 --- a/extra/stt.go +++ b/extra/stt.go @@ -103,7 +103,8 @@ func (stt *WhisperSTT) StopRecording() (string, error) { } resptext := strings.TrimRight(string(responseTextBytes), "\n") // in case there are special tokens like [_BEG_] - return specialRE.ReplaceAllString(resptext, ""), nil + resptext = specialRE.ReplaceAllString(resptext, "") + return strings.TrimSpace(strings.ReplaceAll(resptext, "\n ", "\n")), nil } func (stt *WhisperSTT) writeWavHeader(w io.Writer, dataSize int) { |