• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yext / answers-search-ui / 23318609399

19 Mar 2026 09:50PM UTC coverage: 61.829% (+0.003%) from 61.826%
23318609399

Pull #1988

github

mkouzel-yext
Remove unused import
Pull Request #1988: chore: support unprefixed SpeechRecognition API

2045 of 3453 branches covered (59.22%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

3498 of 5512 relevant lines covered (63.46%)

26.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

43.48
/src/core/speechrecognition/support.js
1
import Bowser from 'bowser';
2

3
/**
4
 * Whether the SpeechRecognition API is supported by the current browser.
5
 *
6
 * Currently all languages in the SDK (en, es, fr, de, it, ja)
7
 * have SpeechRecognition support in browsers that support SpeechRecognition.
8
 * However, because browser specific SpeechRecognition documentation is poor to nonexistent,
9
 * new languages/locales will need to be manually tested for SpeechRecognition support.
10
 *
11
 * @returns {boolean}
12
 */
13
export function speechRecognitionIsSupported () {
14
  const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
2!
15
  if (!(SpeechRecognition && navigator.mediaDevices)) {
2!
UNCOV
16
    return false;
×
17
  }
18

19
  const browserData = Bowser.parse(navigator.userAgent);
2✔
20
  if (browserData.platform.type === 'desktop') {
2!
21
    return true;
2✔
22
  }
23

24
  const os = browserData.os.name;
×
25
  const browser = browserData.browser.name;
×
26

27
  return (browser === 'Safari' && os === 'iOS') ||
×
28
    (browser === 'Chrome' && os === 'Android') ||
29
    (browser === 'Samsung Internet for Android' && os === 'Android');
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc