mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 09:04:36 +00:00
custom voice handling
This commit is contained in:
parent
67ef5e6c02
commit
2abe11071b
3 changed files with 31 additions and 17 deletions
|
@ -352,6 +352,7 @@ class tts_generation_inputs(ctypes.Structure):
|
|||
_fields_ = [("prompt", ctypes.c_char_p),
|
||||
("speaker_seed", ctypes.c_int),
|
||||
("audio_seed", ctypes.c_int),
|
||||
("custom_speaker_voice", ctypes.c_char_p),
|
||||
("custom_speaker_text", ctypes.c_char_p),
|
||||
("custom_speaker_data", ctypes.c_char_p)]
|
||||
|
||||
|
@ -1880,6 +1881,7 @@ def tts_generate(genparams):
|
|||
else:
|
||||
voice = simple_lcg_hash(voicestr.strip()) if voicestr else 1
|
||||
inputs = tts_generation_inputs()
|
||||
inputs.custom_speaker_voice = normalized_voice.encode("UTF-8")
|
||||
inputs.prompt = prompt.encode("UTF-8")
|
||||
inputs.speaker_seed = voice
|
||||
aseed = -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue