# \*\*\*Text to Speech\*\*\* ElevenLabs (JARVIS)

**URL:** <https://forum.wixstudio.com/t/text-to-speech-elevenlabs-jarvis/54919>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [December 30, 2023, 7:41pm UTC](https://forum.wixstudio.com/t/text-to-speech-elevenlabs-jarvis/54919 "2023-12-30T19:41:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [December 30, 2023, 7:41pm UTC](https://forum.wixstudio.com/t/text-to-speech-elevenlabs-jarvis/54919/1 "2023-12-30T19:41:57Z")

</div>

Someone already has worked with the provided API from ElevenLabs and were able to get a → **TEXT 2 SPEECH** ← generator working?

(Without a usage of NPM-MODULE and HTML-Component?)

At this point i have a general question.

## **What is the best way to achieve my aim?**

1. Usage of a HTML-Component/Custom-Element ?
2. Usage of a NMP-Package ?
3. Using fetch() and reaching out to the provided END-POINT directly?

What are the advantages and disatvantage of each of the provided options?

Would like to know a summary of all possible informations about that.

My aim is to rebuild → JARVIS \<— if you know what i mean 😀  
Only this last little step is missing!

I saw some examples and also saw some videos about Text-2-Speech functionalities, but all of them without any quality, this is why i choosed ElevenLabs for my little ( **big** ) project .

Any information to my questions are appreciated. Also additional information is welcome.

And **NO** → i am not using Open-AI’s Text-2-Speech, thex do not provide enough possibilities.

I want to evaluate my question a little bit more.

I was able to make a successful API-Call (request) to ElevenLabs-Endpoint and i also got my response-object including all needed parameteres and the needed binary-data.

So let’s say the binary-data i got looks like the following…

 ![2023-12-31 00_06_57-Chat-GPT _ WixWorld](https://us1.discourse-cdn.com/wix/original/3X/1/8/183cb622e6d4ac53946759658bfe6008e3f4cb78.png)

Separate into chunks by chrome-browser i thing…

 ![2023-12-31 01_19_00-Chat-GPT _ WixWorld](https://us1.discourse-cdn.com/wix/original/3X/1/1/11241a3d4357e517734279ecece937ec31094c54.png)

This is an example of the binary data i got so far… (length = 836) …

`let binaryData = [255,251,144,196,0,0,15,145,129,31,161,140,109,234,103,49,163,113,132,154,33,0,162,154,78,41,25,45,184,0,84,56,160,2,9,64,0,16,1,10,139,103,220,88,65,1,197,160,25,161,64,128,4,232,0,80,158,22,104,65,197,188,0,44,24,25,215,223,127,63,68,71,250,28,12,247,75,250,20,64,49,111,93,247,51,74,44,32,138,6,194,240,224,110,28,13,146,32,1,57,244,195,129,139,224,0,128,226,252,56,27,139,128,4,17,57,116,174,0,161,207,119,4,0,6,7,11,128,4,45,4,113,17,60,56,27,23,18,139,0,17,95,192,7,248,245,29,151,72,157,42,163,32,56,56,168,214,28,17,150,33,53,228,5,12,89,10,74,226,176,40,202,16,34,27,88,72,134,77,234,102,213,91,32,116,88,74,30,4,208,129,161,68,138,31,194,88,40,195,144,38,65,76,174,195,70,45,21,7,176,129,176,91,76,218,248,156,19,99,22,35,209,85,112,37,204,93,162,139,156,106,99,208,92,57,197,172,34,182,71,254,139,20,140,192,133,234,13,227,23,123,246,91,45,234,241,122,221,241,161,226,45,154,220,204,196,229,120,106,110,110,183,136,74,57,201,223,214,71,8,77,146,52,169,196,212,98,246,55,67,94,155,17,125,147,145,53,85,117,149,0,8,64,0,23,49,68,92,131,248,7,20,40,159,14,114,169,56,94,206,48,238,36,228,176,221,69,39,144,45,202,7,169,148,114,42,17,13,8,137,3,65,182,173,84,76,164,146,114,124,177,162,18,34,86,208,170,162,178,88,169,43,36,6,76,168,93,98,221,91,252,219,221,36,216,67,80,19,40,54,190,172,128,148,201,50,142,65,61,212,7,100,209,180,10,46,202,71,32,185,105,166,105,86,152,182,152,71,41,97,58,76,90,208,212,0,237,255,251,146,196,58,128,213,205,151,19,7,189,35,194,229,51,162,21,134,37,48,151,48,211,7,79,48,59,171,54,179,72,227,122,169,220,137,72,211,132,80,56,127,38,145,251,38,156,153,63,147,51,26,137,85,150,71,91,69,85,92,245,210,110,198,122,154,148,63,94,65,97,9,34,101,190,131,189,32,193,252,34,100,185,117,40,194,102,67,175,242,185,135,192,104,78,124,87,16,68,176,228,92,70,57,62,48,59,43,19,8,70,69,101,200,1,86,129,242,150,8,60,140,241,41,244,98,65,9,52,147,128,143,19,2,7,197,140,170,97,151,165,76,242,136,145,58,193,116,108,182,139,45,237,162,18,182,46,66,13,155,130,26,132,8,210,54,84,85,4,4,81,64,155,210,66,14,205,85,201,13,57,1,162,240,92,222,68,228,73,230,26,0,209,70,51,43,47,26,35,25,213,92,2,19,158,118,232,5,96,133,196,141,151,10,152,120,166,114,40,161,209,65,202,211,228,110,155,117,201,84,77,11,20,93,119,40,135,113,52,224,78,172,112,193,6,227,163,68,56,187,17,217,226,17,9,166,145,200,161,78,115,155,114,18,0,0,51,133,33,132,78,152,157,135,121,148,104,191,58,78,21,66,33,36,176,125,183,42,155,108,133,45,166,211,10,99,45,9,132,192,34,228,1,64,161,214,203,9,141,42,66,156,20,45,6,8,9,132,173,10,213,73,131,196,44,199,86,44,218,92,136,218,107,214,154,36,98,163,16,178,208,33,109,2,25,153,98,2,243,68,146,56,172,177,117,135,177,12,220,172,35,69,183,206,77,170,62,67,108,232,65,106,61,3,200,234,96,169,136,147,195,252,68,147,4,152,81,169,44,137,18,184,210,128,136,244,173,2,39,25,151,180,105,240,220,221,76,223,170,147,128,181,118,71,74,45,245,255]`

**I was able to convert it into base64-String:**  
`//uQxAAAD5GBH6GMbepnMaNxhJohAKKaTikZLbgAVDigAglAABABCotn3FhBAcWgGaFAgAToAFCeFmhBxbwALBgZ199/P0RH+hwM90v6FEAxb133M0osIIoGwvDgbhwNkiABOfTDgYvgAIDi/Dgbi4AEETl0rgChz3cEAAYHC4AELQRxETw4GxcSiwARX8AH+PUdl0idKqMgODio1hwRliE15AUMWQpK4rAoyhAiG1hIhk3qZtVbIHRYSh4E0IGhRIofwlgow5AmQUyuw0YtFQewgbBbTNr4nBNjFiPRVXAlzF2ii5xqY9BcOcWsIrZH/osUjMCF6g3jF3v2Wy3q8Xrd8aHiLZrczMTleGpubreISjnJ39ZHCE2SNKnE1GL2N0NemxF9k5E1VXWVAAhAABcxRFyD+AcUKJ8Ocqk4Xs4w7iTksN1FJ5AtygeplHIqEQ0IiQNBtq1UTKSScnyxohIiVtCqorJYqSskBkyoXWLdW/zb3STYQ1ATKDa+rICUyTKOQT3UB2TRtAouykcguWmmaVaYtphHKWE6TFrQ1ADt//uSxDqA1c2XEwe9I8LlM6IVhiUwlzDTB08wO6s2s0jjeqnciUjThFA4fyaR+yacmT+TMxqJVZZHW0VVXPXSbsZ6mpQ/XkFhCSJlvoO9IMH8ImS5dSjCZkOv8rmHwGhOfFcQRLDkXEY5PjA7KxMIRkVlyAFWgfKWCDyM8Sn0YkEJNJOAjxMCB8WMqmGXpUzyiJE6wXRstost7aISti5CDZuCGoQI0jZUVQQEUUCb0kIOzVXJDTkBovBc3kTkSeYaANFGMysvGiMZ1VwCE5526AVghcSNlwqYeKZyKKHRQcrT5G6bdclUTQsUXXcoh3E04E6scMEG46NEOLsR2eIRCaaRyKFOc5tyEgAAM4UhhE6YnYd5lGi/Ok4VQiEksH23KptshS2m0wpjLQmEwCLkAUCh1ssJjSpCnBQtBggJhK0K1UmDxCzHVizaXIjaa9aaJGKjELLQIW0CGZliAvNEkjissXWHsQzcrCNFt85Nqj5DbOhBaj0DyOpgqYiTw/xEkwSYUaksiRK40oCI9K0CJxmXtGnw3N1M36qTgLV2R0ot9f8=`

**And i also got more information about my generated BINARY-AUDIO-STREAM…**

**BODY-PART:**

 ![2023-12-31 01_41_04-Chat-GPT _ WixWorld](https://us1.discourse-cdn.com/wix/original/3X/0/0/005184f477aec1cdf019754bb29cbd46c3e4b3d2.png)

 ![2023-12-31 01_42_25-Chat-GPT _ WixWorld](https://us1.discourse-cdn.com/wix/original/3X/6/7/67e3ec1e35c77f0052afb48b347da12018791933.png)

 ![2023-12-31 01_44_01-Chat-GPT _ WixWorld](https://us1.discourse-cdn.com/wix/original/3X/f/f/ff8a464d43f7e33c138ad870edfde226b07214b6.png)

**HEADER-PART:**

 ![2023-12-31 01_45_54-Chat-GPT _ WixWorld](https://us1.discourse-cdn.com/wix/original/3X/8/d/8d52f8cabde721fa461f1b984c483d6f742b0fa5.png)

**So my question is now how to get that data back to a playable audio(stream or file) ???  
Or in other words → what to do to be able to hear the generated binary data ???**

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [December 31, 2023, 2:04am UTC](https://forum.wixstudio.com/t/text-to-speech-elevenlabs-jarvis/54919/2 "2023-12-31T02:04:32Z")

</div>

**!!! O M G!!!**

**GOT THAT —\> S H I T \<— to work !!!**

The real → ARRAY-BUFFER \<—  
 ![2023-12-31 03_28_03-Chat-GPT _ WixWorld](https://us1.discourse-cdn.com/wix/original/3X/9/1/91d012f007f4329a727aa5e460f199a79c5793c7.png)

🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫 🤫

**!!! Direct text to speech !!!** → Let’s activate **AI-based-JARVIS** 😀 🙃 🤪 with a HIGH-QUALITY-SOUND.

JARVIS → **SIMULATE** voice of → Donald-Trump 🤪  
JARVIS → **READ** the following text […]  
JARVIS → **NAVIGATE** me to …  
JARVIS → **TRANSLATE** to german → speech…  
JARVIS → **TRANSLATE** to italian → text…  
JARVIS → **FILTER\_MY\_DATASET** --\>\>\>\>\>\>\>\>\>\>\>\>\> 🤪  
JARVIS → **GENERATE** me a → DATABASE-QUERY from my CONTACTS-DATABASE 🤪  
JARVIS → **TELLME** : What time is it?  
JARVIS → **WRITE** me a story about… (generate your own story).  
JARVIS → **START** my **CRAWLER** on www. 🤭 🤪  
JARVIS → **TURN\_OFF** the light in the livin-room 🤪 (hello ARDUINO)!  
JARVIS → **CHECK** the oil level in my vehicle.  
JARVIS → **SPEAK** —\> russian 🤪  
JARVIS → **OPEN** → **PDF** -file  
JARVIS → **CALL** → my GRANDMA !!! 🙃 😁 🙃 😁

And do not forget → JARVIS will answer like a human, or a robot (on your own choice, because JARVIS can change it’s voice without any problem) !!!

**What would you do, if you would have that AI-POWER ???**

🤪 🤭

![logo1](https://us1.discourse-cdn.com/wix/original/3X/6/2/627491c9c56538da40ff7c7b35c6f4cea84ad8ad.png)

But again with workarounds! 🤧 🤧 🤧 🤧 🤧 😒 😒 😒 😒
