Let Cursor AI add Auto-Speak to my Web Search Assistant
I am a big fan of Cursor AI and use it for a lot of my coding and even for writing tasks like this article. For my take on Cursor AI see my blog post Cursor AI - The Beginning.
My Web Search Assistant is a small Web Tool that takes a question, searches via Brave Search API and answers the question based on the contents of the first pages of the search results. You could think of it being a mini Perplexity.ai probably with a very narrow focus. I did not want to create a remake of Perplexity.ai - I just needed some playground to try out some ideas.
Adding Auto-Speak
I often wished for a feature like auto-speak when using web pages. Heise.de had it back in the days but removed it ... and they have it again for a while now!
So I started to think about how I could add such a feature to my Web Search Assistant. But I did not want to add it manually because I actually did not know how the browser support for text-to-speech is.
Therefore I decided to tell Cursor AI what I wanted using the Composer Feature (now called Composer/Notepads) and let it do the magic. In the following video you can see the process of the feature being created wich I specifically recorded in a rather slow page for demonstration purposes. Probably I will try to get the prompt as text in here but for now you will need to pause the video to read it.
Take aways
Cursor AI is awesome
It did work out of the box for me. The rest of the integration was supported by Cursors Copilot++ so it was a very smooth experience.
Text-to-Speech in the Browser
I found it very practical to have it directly in the browser usable with just a line of code in the end.
The Text-to-Speech models in the Browser are quite different. When used from Chrome browser on MacOS the voices are not very pleasant to listen to.
On my Android phone the voice sounds much better and it is way more natural.