Public
Edited
Jun 1, 2023
Insert cell
Insert cell
html`
<audio controls>
<source src="${elevenResult.data[0].data}" type="audio/x-wav">
</audio>`
Insert cell
import{eleven} from "@huggingface/hello-gradio-client-js"
Insert cell
import { guard } from "@mootari/inputs-submit"
Insert cell
viewof tts_values = guard(
({ template }) =>
Inputs.form(
{
text: Inputs.text({
label: "Text",
width: "100%",
value:
paper_intro_first_paragraph
}),
voice: Inputs.select(
[
"Rachel",
"Domi",
"Bella",
"Antoni",
"Elli",
"Josh",
"Arnold",
"Adam",
"Sam"
],
{
width: "100%",
label: "Voice",
value: "Bella"
}
)
},
{ template }
),
{ width: "100%" }
)
Insert cell
elevenResult = eleven.predict(0, [
tts_values.text,
tts_values.voice,
"eleven_multilingual_v1"
])
Insert cell
paper_intro_first_paragraph = 'In recent years, there has been a great interest in the techniques of speech synthesis. In applications where only a small number of words are to be spoken, real speech can be digitized, encoded, and stored for later decoding and playback on command. But for many applications, such as reading machines for the blind, stored speech is impractical. A preferred method for applications that demand real-time speech synthesis is text-to-speech conversion'
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more