Merge from main (#113)
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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"},
|
||||||
|
|||||||
Reference in New Issue
Block a user