WebSpeach API Custom Javascript

Hey there!
I have a question about adding a large amount of code to the editor. I’m talking about a script file that will allow me to record sound, convert it to speech from the frontend using WebSpeach API. What approach would you suggest as the best solution? The code is about 200 lines long and consists of parts for getting user consent to record sound, then clicking a button to download the transcription, and displaying the result on the screen. It seems that adding such a workflow function may be too long, and this function will also update many other components on the frontend. What approach would you suggest? Is there such a thing as a custom code editor with global scope, or should I create my own component and add the code to it?

Thank you!

I’m not sure there’s a big limitation on the amount of code you can bring to the party. For larger imports like this, it can be convenient to make it into a separate file. There are a couple of services online that will host that kind of file for you, and then you can add it to weweb relatively easily either manually with a script tag or with the free https://weweb-embed.statechange.ai tool

State Change membership comes with access to our ScriptTag tool that is popular for managing the code and deploying it. Here’s the intro vid I made for members about our weweb integration: Scripttag Weweb Embeds - Descript

2 Likes

I love ScriptTag!! Best investment I’ve made.

1 Like

Thanks for the response!
Something here confuses me. Imagine WeWeb as a platform that bridges the gap between coding and no-code. By including a custom code editor with code containing global scope functions that can be triggered through workflows, it could be a real game-changer and make things much simpler.