[VOICEVOX]Removed unneeded logs,Fixed voice display

This commit is contained in:
drPpZero
2023-05-26 20:02:10 +09:00
parent 8f6d82ef48
commit c564c2135a
2 changed files with 1 additions and 4 deletions

View File

@@ -495,7 +495,7 @@
<select class="bg-transparent input-text mt-2 mb-4 text-gray-200 appearance-none text-sm" bind:value={currentChar.data.ttsSpeech}> <select class="bg-transparent input-text mt-2 mb-4 text-gray-200 appearance-none text-sm" bind:value={currentChar.data.ttsSpeech}>
{#await getVOICEVOXVoices() then voices} {#await getVOICEVOXVoices() then voices}
{#each voices as voice} {#each voices as voice}
<option value={voice.id} class="bg-darkbg appearance-none">{voice.name}</option> <option value={voice.id} class="bg-darkbg appearance-none" selected={currentChar.data.ttsSpeech === voice.id}>{voice.name}</option>
{/each} {/each}
{/await} {/await}
</select> </select>

View File

@@ -61,7 +61,6 @@ export async function sayTTS(character:character,text:string) {
} }
case "VOICEVOX": { case "VOICEVOX": {
const jpText = await translateVox(text) const jpText = await translateVox(text)
console.log(jpText);
const audioContext = new AudioContext(); const audioContext = new AudioContext();
const query = await fetch(`${db.voicevoxUrl}/audio_query?text=${jpText}&speaker=${character.ttsSpeech}`, { const query = await fetch(`${db.voicevoxUrl}/audio_query?text=${jpText}&speaker=${character.ttsSpeech}`, {
method: 'POST', method: 'POST',
@@ -81,8 +80,6 @@ export async function sayTTS(character:character,text:string) {
outputStereo: queryJson.outputStereo, outputStereo: queryJson.outputStereo,
kana: queryJson.kana, kana: queryJson.kana,
} }
console.log(JSON.stringify(bodyData))
console.log (bodyData)
const getVoice = await fetch(`${db.voicevoxUrl}/synthesis?speaker=${character.ttsSpeech}`, { const getVoice = await fetch(`${db.voicevoxUrl}/synthesis?speaker=${character.ttsSpeech}`, {
method: 'POST', method: 'POST',
headers: { "Content-Type": "application/json"}, headers: { "Content-Type": "application/json"},