Skip to main content


· One min read

Over the weekend I entered a hackathon with with a focus on ElevenLabs.

"the most advanced text to speech and voice cloning software ever."

I found a bunch of great guys last minute, created a team and built an AI tour guide.

You can view the app here, and uur full application is here. This includes a video with our pitch made by the rest of the team.

To use ElevenLabs in your frontend JavaScript project (speak some text), you can make an API call to them like this

import axios from 'axios';

const playAudio = async ({ text, voiceId }) => {
const response = await
{ text },
headers: {
'Content-Type': 'application/json',
'xi-api-key': process.env.REACT_APP_ELEVENLABS_API_KEY
responseType: 'blob'

const audio = new Audio(URL.createObjectURL(;;

await new Promise(resolve => {
audio.addEventListener('ended', () => {

export { playAudio };

-- gist