๐๏ธ Interactive Widget Demos
Progressive feature examples - from basic to fully-featured. Toggle between Live Demo and Code to see how each works.
Try hovering and clicking the widgets to see controls appear. Each example builds on the previous one.
1. Basic Modeโ
Just a play button - perfect for simple content.
- Live Demo
- Code
<!-- Add to your content -->
<div class="supernal-tts-widget"
data-voice="fable">
<p>Welcome to Supernal TTS! This is the basic mode with just a play button. </p>
</div>
<script type="module">
import { SupernalTTS } from 'supernal-tts-widget';
SupernalTTS.init({ apiUrl: 'https://tts.supernal.ai' });
</script>
2. With Voice Selectionโ
Play button + voice dropdown (appears on hover).
- Live Demo
- Code
<div class="supernal-tts-widget"
data-voice="fable"
data-voices="fable,nova,onyx,shimmer">
<p>Now we have voice options! Hover over the widget to reveal the voice selector. Click the chevron to choose from different voices.</p>
</div>
3. With Speed Controlโ
Play + voice + speed dropdown (discrete steps: 0.6x to 3.0x in 0.2 increments).
- Live Demo
- Code
<div class="supernal-tts-widget"
data-voice="fable"
data-voices="fable,nova,onyx,shimmer"
data-enable-speed="true"
data-speed="1.0">
<p>Adding speed control! Hover to see the voice and speed icons. The lightning bolt reveals speeds from 0.6x to 3.0x.</p>
</div>
4. Full-Featured (With Progress Bar)โ
All controls + seekable progress bar (shows on hover or when playing).
- Live Demo
- Code
<div class="supernal-tts-widget"
data-voice="fable"
data-voices="fable,nova,onyx,shimmer"
data-enable-speed="true"
data-enable-progress="true"
data-speed="1.0">
<p>This is the full-featured widget with voice selection, speed control, and progress bar. Hover to reveal all controls and the seekable timeline.</p>
</div>
Voice Comparisonโ
Try different OpenAI voices with the same content.
- Live Demo
- Code
<!-- Nova -->
<div class="supernal-tts-widget" data-voice="nova">
<p><strong>Nova:</strong> Energetic and enthusiastic</p>
</div>
<!-- Onyx -->
<div class="supernal-tts-widget" data-voice="onyx">
<p><strong>Onyx:</strong> Deep and authoritative</p>
</div>
<!-- Shimmer -->
<div class="supernal-tts-widget" data-voice="shimmer">
<p><strong>Shimmer:</strong> Warm and friendly</p>
</div>
<!-- Fable -->
<div class="supernal-tts-widget" data-voice="fable">
<p><strong>Fable:</strong> Balanced and expressive</p>
</div>
React Integrationโ
Using the widget in React applications.
- Code
import { useEffect } from 'react';
import 'supernal-tts-widget/widget.css';
export function TTSContent() {
useEffect(() => {
import('supernal-tts-widget/widget.js')
.then(({ SupernalTTS }) => {
SupernalTTS.init({
apiUrl: 'https://tts.supernal.ai'
});
});
}, []);
return (
<div className="supernal-tts-widget"
data-voice="fable"
data-voices="fable,nova,onyx"
data-enable-speed="true"
data-enable-progress="true">
<p>Your content here</p>
</div>
);
}
Custom Widget Generatorโ
Configure all options and get copy-paste ready code.
Next Stepsโ
- ๐ Read the Full Documentation
- ๐จ Customize the styling
- ๐ Get an API Key