top of page
Speechly Integration

Speechly Integration

Allow your site visitors to filter store products with speech recognition, using the wix-stores-speechly Velo package.

Intermediate.png

Intermediate

2K

Published:

September 1, 2021

Girl Enjoying her Drink

by

Anchor 1
Hire a Developer

Example Description

In this example we used the Speechly Integration Velo package to allow your site visitors to filter store products using speech recognition. When a site visitor holds down the push-to-talk button and says a term that matches a filter in the UI, the product page displays the filtered products set by the site visitor’s speech input. We also added a speech-to-text transcript for displaying the speech input detected.

 

 

Note: To use this example, you must have a Wix Premium account with a connected domain, and add a Wix Store to your site.

For more information about this Velo Package, please see the Readme in the package folder located in the Code Files section of your site.

Example Code

Tab 1

.

Tab 2

.

Tab 3

.

This code solution can be complicated.

How We Built It

We installed the Velo package on our site, and followed the steps described in the Setup section of the package’s readme file.



Page Elements


In our site we added 2 custom elements:


See the Setup section of the package readme for more information on how to set up these custom elements.


We also added the following elements to our site:

  • 5 dropdown input elements as the product filters

  • 1 slider input element as a product filter

  • 1 product repeater to display our store products

  • 1 button for clearing the filters



Code


  1. We made an account with Speechly and created a new project. We retrieved our API token, and stored it as a new secret in the Secrets Manager with the name velo-speechly-token.

  2. We created a new .js file in our backend code, init-speechly.js to initialize the connection from our site to Speechly.

  3. From there, we ran the init() function on the backend, and got a return with our speechlyAppId. We set this value in the package’s wix-stores-speechly-config.json file.

  4. On our store products page, we declared all the input elements (components) we wanted to use for filtering products in the $w.onReady() function. We then called the startVoice() and buildPage() functions with the components.

  5. The startVoice() function initializes the speech recognition and speech-to-text functionalities when a site visitor presses the push-to-talk button and starts talking. The event listener on the button triggers and returns an object containing the site visitor’s intent and entity (voice input detected). If any of the terms in the return object match one or more terms in the UI filters, the speech recognition is able to filter the store products.

  6. The buildPage() function displays the filtered products set by the site visitor’s voice input in the product repeater.


For any questions or assistance, email speechly directly at hello@speechly.com.

APIs We Used

Non-code example.

Non-code example.

Non-code example.

Non-code example.

Non-code example.

Non-code example.

Related Articles

Hire a Developer

Velo solutions are powerful tools, but building them on your own can be challenging. Let an experienced Velo development shop build it for you, so you can keep working on your site or business.

Related Examples

Did this help?

Yes

|

No

Thanks for your feedback!

QR Code Generator

QR Code Generator

Create your own custom QR codes.

Intermediate.png

Advanced

Detect Image Labels

Detect Image Labels

Use Google’s vision NPM module to detect an image’s labels.

Intermediate.png

Advanced

Twilio SMS Integration

Twilio SMS Integration

Integrate with Twilio to send SMS messages

Intermediate.png

Intermediate

Anchor 2
bottom of page