liumaolin
commited on
Commit
·
3a6b6fc
1
Parent(s):
259c23b
在生成TTS音频时始终记录生成信息。
Browse files
src/voice_dialogue/services/audio/generator.py
CHANGED
|
@@ -3,7 +3,7 @@ from multiprocessing import Queue
|
|
| 3 |
from queue import Empty
|
| 4 |
|
| 5 |
from voice_dialogue.core.base import BaseThread
|
| 6 |
-
from voice_dialogue.core.constants import voice_state_manager
|
| 7 |
from voice_dialogue.models.voice_task import VoiceTask
|
| 8 |
from voice_dialogue.services.mixins import TaskStatusMixin
|
| 9 |
from voice_dialogue.services.utils import has_no_words
|
|
@@ -89,8 +89,7 @@ class TTSAudioGenerator(BaseThread, TaskStatusMixin):
|
|
| 89 |
logger.info(f"跳过仅包含标点的文本: '{voice_task.answer_sentence}'")
|
| 90 |
return
|
| 91 |
|
| 92 |
-
|
| 93 |
-
logger.info(f"TTS 音频生成: {voice_task.answer_sentence}")
|
| 94 |
|
| 95 |
voice_task.tts_start_time = time.time()
|
| 96 |
try:
|
|
|
|
| 3 |
from queue import Empty
|
| 4 |
|
| 5 |
from voice_dialogue.core.base import BaseThread
|
| 6 |
+
from voice_dialogue.core.constants import voice_state_manager
|
| 7 |
from voice_dialogue.models.voice_task import VoiceTask
|
| 8 |
from voice_dialogue.services.mixins import TaskStatusMixin
|
| 9 |
from voice_dialogue.services.utils import has_no_words
|
|
|
|
| 89 |
logger.info(f"跳过仅包含标点的文本: '{voice_task.answer_sentence}'")
|
| 90 |
return
|
| 91 |
|
| 92 |
+
logger.info(f"TTS 音频生成: {voice_task.answer_sentence}")
|
|
|
|
| 93 |
|
| 94 |
voice_task.tts_start_time = time.time()
|
| 95 |
try:
|
src/voice_dialogue/services/audio/player.py
CHANGED
|
@@ -9,7 +9,7 @@ from playsound import playsound
|
|
| 9 |
|
| 10 |
from voice_dialogue.core.base import BaseThread
|
| 11 |
from voice_dialogue.core.constants import (
|
| 12 |
-
voice_state_manager, silence_over_threshold_event
|
| 13 |
)
|
| 14 |
from voice_dialogue.models.voice_task import VoiceTask, AnswerDisplayMessage
|
| 15 |
from voice_dialogue.services.mixins import TaskStatusMixin, HistoryMixin, PerformanceLogMixin
|
|
|
|
| 9 |
|
| 10 |
from voice_dialogue.core.base import BaseThread
|
| 11 |
from voice_dialogue.core.constants import (
|
| 12 |
+
voice_state_manager, silence_over_threshold_event
|
| 13 |
)
|
| 14 |
from voice_dialogue.models.voice_task import VoiceTask, AnswerDisplayMessage
|
| 15 |
from voice_dialogue.services.mixins import TaskStatusMixin, HistoryMixin, PerformanceLogMixin
|