mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-02 15:14:08 +03:00
feat(python tcp server): map speech synthesis hardware device choice to settings
This commit is contained in:
parent
a05f34422e
commit
8eeff3a01c
@ -4,7 +4,8 @@
|
|||||||
"device": "auto"
|
"device": "auto"
|
||||||
},
|
},
|
||||||
"tts": {
|
"tts": {
|
||||||
"model_file_name": "EN-Leon-V1_1-G_600000.pth"
|
"model_file_name": "EN-Leon-V1_1-G_600000.pth",
|
||||||
|
"device": "auto"
|
||||||
},
|
},
|
||||||
"wake_word": {}
|
"wake_word": {}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ class TCPServer:
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.tts = TTS(language='EN',
|
self.tts = TTS(language='EN',
|
||||||
device='cpu',
|
device=get_settings('tts')['device'],
|
||||||
config_path=TTS_MODEL_CONFIG_PATH,
|
config_path=TTS_MODEL_CONFIG_PATH,
|
||||||
ckpt_path=TTS_MODEL_PATH
|
ckpt_path=TTS_MODEL_PATH
|
||||||
)
|
)
|
||||||
|
@ -18,6 +18,7 @@ from ..utils import is_macos
|
|||||||
class TTS(nn.Module):
|
class TTS(nn.Module):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
language,
|
language,
|
||||||
|
# auto, cpu, cuda, mps
|
||||||
device='auto',
|
device='auto',
|
||||||
use_hf=True,
|
use_hf=True,
|
||||||
config_path=None,
|
config_path=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user