mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-07-10 01:18:32 +00:00
option to save tts as mp3, currently slightly bugged
This commit is contained in:
parent
2c64520ba6
commit
1b36e7f606
4 changed files with 29 additions and 6 deletions
|
|
@ -498,7 +498,8 @@ class tts_generation_inputs(ctypes.Structure):
|
|||
("custom_speaker_text", ctypes.c_char_p),
|
||||
("custom_speaker_data", ctypes.c_char_p),
|
||||
("reference_audio", ctypes.c_char_p),
|
||||
("speaker_instruction", ctypes.c_char_p)]
|
||||
("speaker_instruction", ctypes.c_char_p),
|
||||
("use_mp3", ctypes.c_bool)]
|
||||
|
||||
class tts_generation_outputs(ctypes.Structure):
|
||||
_fields_ = [("status", ctypes.c_int),
|
||||
|
|
@ -2999,6 +3000,7 @@ def tts_generate(genparams):
|
|||
if not genparams.get("instruction", ""):
|
||||
prompt, ttsinstruction = tts_extract_instruction(prompt)
|
||||
inputs.speaker_instruction = ttsinstruction.encode("UTF-8")
|
||||
inputs.use_mp3 = genparams.get("use_mp3", False)
|
||||
inputs.prompt = prompt.encode("UTF-8")
|
||||
inputs.speaker_seed = voice
|
||||
aseed = -1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue