Mercurial Hosting > lang
diff src/site.js @ 46:cc20eebaa74a
use openai tts
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 14 Aug 2025 11:27:34 +0900 |
parents | fef7a5c65cfb |
children |
line wrap: on
line diff
--- a/src/site.js Wed Aug 13 10:31:24 2025 +0900 +++ b/src/site.js Thu Aug 14 11:27:34 2025 +0900 @@ -151,7 +151,7 @@ } } -function handleMarkdown(lang,voice) { +function handleMarkdown(voice,instructions) { let converter = window.markdownit(); let divs = document.querySelectorAll('[markdown]'); for( let div of divs ) { @@ -166,7 +166,7 @@ rt.remove(); } //console.log(mdDiv.textContent); - parent.querySelector('audio').src = `/tts.mp3?lang=${lang}&voice=${voice}&text=${encodeURIComponent(mdDiv.textContent)}`; + parent.querySelector('audio').src = `/tts.mp3?voice=${voice}&instructions=${encodeURIComponent(instructions)}&text=${encodeURIComponent(mdDiv.textContent)}`; } } }