mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-18 16:55:14 +02:00
custom voice handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user