|
143 | 143 | <body> |
144 | 144 | <span class="eyebrow">TTS API Demo</span> |
145 | 145 | <h1>Readium Speech Server</h1> |
146 | | -<p>Talks to <code>GET /v1/voices</code> and <code>POST /v1/synthesize</code> on this same origin.</p> |
| 146 | +<p>Talks to <code>GET /voices</code> and <code>POST /synthesize</code> on this same origin.</p> |
147 | 147 |
|
148 | 148 | <div class="card"> |
149 | 149 | <label for="text">Utterance</label> |
|
266 | 266 | function updateCurl() { |
267 | 267 | const body = JSON.stringify(requestBody()); |
268 | 268 | curlEl.textContent = |
269 | | - `curl -s -X POST ${location.origin}/v1/synthesize \\\n` + |
| 269 | + `curl -s -X POST ${location.origin}/synthesize \\\n` + |
270 | 270 | ` -H 'Content-Type: application/json' \\\n` + |
271 | 271 | ` -d '${body}' \\\n` + |
272 | 272 | ` -o speech.${boundaryEl.checked ? 'json' : formatEl.value}`; |
|
315 | 315 | genderFilterEl.addEventListener('change', renderVoiceOptions); |
316 | 316 |
|
317 | 317 | async function loadVoices() { |
318 | | - const resp = await fetch('/v1/voices'); |
| 318 | + const resp = await fetch('/voices'); |
319 | 319 | allVoices = await resp.json(); |
320 | 320 | populateFilterOptions(langFilterEl, [...new Set(allVoices.map(v => v.language))].sort()); |
321 | 321 | const providers = [...new Set(allVoices.map(v => v.provider))].sort(); |
|
329 | 329 | statusPillEl.style.display = 'none'; |
330 | 330 | outputEl.classList.remove('error'); |
331 | 331 | outputEl.textContent = 'Loading...'; |
332 | | - const resp = await fetch('/v1/synthesize', { |
| 332 | + const resp = await fetch('/synthesize', { |
333 | 333 | method: 'POST', |
334 | 334 | headers: { 'Content-Type': 'application/json' }, |
335 | 335 | body: JSON.stringify(requestBody()), |
|
0 commit comments