mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
TTS: Avoid default voice selector display itself
This commit is contained in:
@@ -716,12 +716,14 @@ class VoiceMapEntry {
|
|||||||
|
|
||||||
addUI(voiceIds){
|
addUI(voiceIds){
|
||||||
let sanitizedName = sanitizeId(this.name)
|
let sanitizedName = sanitizeId(this.name)
|
||||||
|
let defaultOption = this.name === DEFAULT_VOICE_MARKER ?
|
||||||
|
'<option>disabled</option>' :
|
||||||
|
`<option>${DEFAULT_VOICE_MARKER}</option><option>disabled</option>`
|
||||||
let template = `
|
let template = `
|
||||||
<div class='tts_voicemap_block_char flex-container flexGap5'>
|
<div class='tts_voicemap_block_char flex-container flexGap5'>
|
||||||
<span id='tts_voicemap_char_${sanitizedName}'>${this.name}</span>
|
<span id='tts_voicemap_char_${sanitizedName}'>${this.name}</span>
|
||||||
<select id='tts_voicemap_char_${sanitizedName}_voice'>
|
<select id='tts_voicemap_char_${sanitizedName}_voice'>
|
||||||
<option>${DEFAULT_VOICE_MARKER}</option>
|
${defaultOption}
|
||||||
<option>disabled</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
@@ -808,7 +810,7 @@ export async function initVoiceMap(){
|
|||||||
} else if (character === DEFAULT_VOICE_MARKER) {
|
} else if (character === DEFAULT_VOICE_MARKER) {
|
||||||
voiceId = 'disabled'
|
voiceId = 'disabled'
|
||||||
} else {
|
} else {
|
||||||
voiceId = '[Default Voice]'
|
voiceId = DEFAULT_VOICE_MARKER
|
||||||
}
|
}
|
||||||
const voiceMapEntry = new VoiceMapEntry(character, voiceId)
|
const voiceMapEntry = new VoiceMapEntry(character, voiceId)
|
||||||
voiceMapEntry.addUI(voiceIdsFromProvider)
|
voiceMapEntry.addUI(voiceIdsFromProvider)
|
||||||
|
Reference in New Issue
Block a user