mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-30 16:33:56 +08:00
部分TTS参数调整
This commit is contained in:
@@ -15,7 +15,6 @@ class TTSProvider(TTSProviderBase):
|
||||
self.url = config.get("url")
|
||||
self.method = config.get("method", "GET")
|
||||
self.headers = config.get("headers", {})
|
||||
self.format = config.get("format", "wav")
|
||||
self.audio_file_type = config.get("format", "wav")
|
||||
self.output_file = config.get("output_dir", "tmp/")
|
||||
self.params = config.get("params")
|
||||
@@ -29,7 +28,7 @@ class TTSProvider(TTSProviderBase):
|
||||
raise TypeError("Custom TTS配置参数出错, 请参考配置说明")
|
||||
|
||||
def generate_filename(self):
|
||||
return os.path.join(self.output_file, f"tts-{datetime.now().date()}@{uuid.uuid4().hex}.{self.format}")
|
||||
return os.path.join(self.output_file, f"tts-{datetime.now().date()}@{uuid.uuid4().hex}.{self.audio_file_type}")
|
||||
|
||||
async def text_to_speak(self, text, output_file):
|
||||
request_params = {}
|
||||
|
||||
Reference in New Issue
Block a user