Configuration
Voice Search
Let shoppers search by speaking — hands-free voice input on the search bar and the AI Search assistant.
What it does
Voice Search uses the browser's built-in Web Speech API to capture a shopper's spoken query and convert it to text in real time. The transcript is fed into the SearchX widget exactly as if the shopper had typed it, so all existing ranking rules, filters, and AI Search features work unchanged.
The microphone button appears in two places:
- Search bar — next to the text input, visible on desktop and mobile.
- AI Search popup — inside the Ask AI panel when AI Search is also enabled.
The mic button is auto-hidden on browsers that do not support the Web Speech API, so no manual feature-detection code is needed on your side.
How to enable
Option 1 — SDK init flag
Pass voiceSearchEnabled: true in the settings object when initialising the SDK:
// ✅ Correct key
SearchXSDK.init({
app_id: 'YOUR_APP_ID',
api_key: 'YOUR_API_KEY',
settings: {
voiceSearchEnabled: true,
},
});
// ❌ Wrong key — has no effect
SearchXSDK.init({
settings: {
voice_search_enabled: true, // snake_case is not valid here
},
});
Option 2 — Admin toggle
Enable Voice Search from the SearchX dashboard under Settings → Search. This sets the voice_search_enabled flag in the search-settings response returned to the widget at startup.
Precedence
The admin toggle takes precedence over the SDK init flag. If the admin has disabled Voice Search for an application, passing voiceSearchEnabled: true in the SDK has no effect.
Browser and device support
The Web Speech API is supported on the browsers below. On unsupported browsers (Firefox, older Safari) the mic button is automatically hidden.
| Browser | Desktop | Android | iOS |
|---|---|---|---|
| Chrome | ✅ | ✅ | ✅ |
| Edge | ✅ | ✅ | ✅ |
| Safari 14.1+ (macOS) / 14.5+ (iOS) | ✅ | — | ✅ |
| Opera | ✅ | ✅ | ✅ |
| Firefox | ❌ | ❌ | ❌ |
| Brave | ❌ | ❌ | ❌ |
iOS browser behaviour
On iOS, Apple requires all browsers (Chrome, Edge, Opera, etc.) to use the WebKit engine. As a result, any browser on iOS 14.5+ that exposes the WebKit Speech API will show the mic button — not just Safari. The mic button is hidden only on browsers that actively block the API (Firefox, Brave).
Brave blocks voice search
Brave's fingerprinting protection blocks the Web Speech API regardless of whether voice search is enabled in the admin dashboard. The mic button will not appear in Brave on any platform. A console log is emitted when this happens: [SearchX] Voice search is enabled but cannot be rendered: browser does not support the Web Speech API.
HTTPS required
The Web Speech API only works on HTTPS origins. It will not activate on http:// pages, even in development. Use a local HTTPS proxy or test on a deployed preview URL if you need to verify voice input end-to-end.
Recognition language
Voice Search follows the storefront locale set by the language setting passed to SearchXSDK.init. The locale is mapped to the closest BCP-47 tag before being passed to the speech engine:
| SearchX locale | BCP-47 passed to browser |
|---|---|
el | el-GR |
en | en-US |
fr-CA | fr-CA (passed through unchanged) |
| any other full BCP-47 | passed through unchanged |
Any language supported by the browser's speech engine works automatically — you don't need to configure anything beyond setting the storefront locale.
Privacy
Audio is processed by the browser's built-in speech service — Google's servers on Chrome, Apple's servers on Safari. Audio is not sent to SearchX. Advise covering voice-based transcription in your privacy policy and cookie/consent flows where required by local law (e.g. GDPR).
Related
- SDK Reference — full list of
SearchXSDK.initsettings - Widget Styling — CSS classes for the mic button and indicator
- AI Search — the AI Search popup where the second mic button appears