mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 18:23:59 +08:00
修正剩余文本
This commit is contained in:
@@ -461,18 +461,7 @@ class TTSProviderBase(ABC):
|
|||||||
if remaining_text:
|
if remaining_text:
|
||||||
segment_text = textUtils.get_string_no_punctuation_or_emoji(remaining_text)
|
segment_text = textUtils.get_string_no_punctuation_or_emoji(remaining_text)
|
||||||
if segment_text:
|
if segment_text:
|
||||||
if self.delete_audio_file:
|
self.to_tts(segment_text, opus_handler=self.handle_opus)
|
||||||
audio_datas = self.to_tts(segment_text)
|
|
||||||
if audio_datas:
|
|
||||||
self.tts_audio_queue.put(
|
|
||||||
(SentenceType.MIDDLE, audio_datas, segment_text)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
tts_file = self.to_tts(segment_text)
|
|
||||||
audio_datas = self._process_audio_file(tts_file, callback=self.handle_opus)
|
|
||||||
self.tts_audio_queue.put(
|
|
||||||
(SentenceType.MIDDLE, audio_datas, segment_text)
|
|
||||||
)
|
|
||||||
self.processed_chars += len(full_text)
|
self.processed_chars += len(full_text)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user