mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-04-28 03:30:20 +00:00
improve musicui load tts params
This commit is contained in:
parent
c8d6546a14
commit
0f1e1b7ae0
1 changed files with 20 additions and 0 deletions
|
|
@ -547,7 +547,27 @@ function updateForm(data){
|
|||
//let origseed = document.getElementById("seed").value;
|
||||
Object.keys(data).forEach(k=>{
|
||||
if(document.getElementById(k))
|
||||
{
|
||||
document.getElementById(k).value=data[k]??"";
|
||||
}else{
|
||||
if(k=="input") //for tts input
|
||||
{
|
||||
document.getElementById("tts_input").value=data[k]??"";
|
||||
}
|
||||
else if (k == "voice") {
|
||||
const ttsVoice = document.getElementById("tts_voice");
|
||||
const newValue = data[k] ?? "";
|
||||
const optionExists = ttsVoice.querySelector(`option[value="${CSS.escape(newValue)}"]`);
|
||||
if (newValue && optionExists) {
|
||||
ttsVoice.value = newValue;
|
||||
}
|
||||
}
|
||||
else if(k=="instruction")
|
||||
{
|
||||
document.getElementById("tts_instruction").value=data[k]??"";
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
//if(origseed=="-1" || origseed=="")
|
||||
//{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue