default is speed 0.9 now.
modified: index.html modified: uncloseai.js
This commit is contained in:
parent
292c94cc67
commit
c3ccc092a1
2 changed files with 5 additions and 5 deletions
|
|
@ -204,7 +204,7 @@ client = openai.OpenAI(
|
|||
with client.audio.speech.with_streaming_response.create(
|
||||
model="tts-1",
|
||||
voice="alloy",
|
||||
speed=0.8,
|
||||
speed=0.9,
|
||||
input="I think so therefore, Today is a wonderful day to build something people love!"
|
||||
) as response:
|
||||
response.stream_to_file("speech.mp3")
|
||||
|
|
@ -223,7 +223,7 @@ async function getSpeech() {
|
|||
const response = await client.audio.speech.with_streaming_response.create({
|
||||
model: "tts-1",
|
||||
voice: "alloy",
|
||||
speed: 0.8,
|
||||
speed: 0.9,
|
||||
input: "I think so therefore, Today is a wonderful day to build something people love!"
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ function extractWebpageContent() {
|
|||
}
|
||||
|
||||
// Function to read text using TTS
|
||||
async function speakText(text, voice = 'alloy', rate = 0.8) {
|
||||
async function speakText(text, voice = 'alloy', rate = 0.9) {
|
||||
try {
|
||||
const response = await fetch(TTS_API_URL, {
|
||||
method: 'POST',
|
||||
|
|
@ -467,7 +467,7 @@ async function openTTSModal() {
|
|||
// Speed selection
|
||||
const speedLabel = document.createElement('label');
|
||||
const speedValue = document.createElement('span');
|
||||
speedValue.textContent = '0.8'; // initial value
|
||||
speedValue.textContent = '0.9'; // initial value
|
||||
|
||||
speedLabel.textContent = `Speed: ${speedValue.textContent}`;
|
||||
const speedSlider = document.createElement('input');
|
||||
|
|
@ -475,7 +475,7 @@ async function openTTSModal() {
|
|||
speedSlider.min = '0.25';
|
||||
speedSlider.max = '4.0';
|
||||
speedSlider.step = '0.05';
|
||||
speedSlider.value = '0.8';
|
||||
speedSlider.value = '0.9';
|
||||
|
||||
speedSlider.oninput = () => {
|
||||
speedValue.textContent = speedSlider.value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue