UNPKG

web-speech-profanity

Version:

Web Speech API adapter to use Cognitive Services Speech Services for both speech-to-text and text-to-speech service.

30 lines (26 loc) 820 B
export default function getPonyfillCapabilities(ponyfillType) { const browser = ponyfillType === 'browser'; const speechServices = /^speechservices:/u.test(ponyfillType); const bundle = browser || ponyfillType === 'speechservices:bundle'; const npm = ponyfillType === 'speechservices:npm'; const customSpeech = speechServices; const customVoice = speechServices; const dynamicPhrases = speechServices; const inverseTextNormalization = speechServices; const maxAlternatives = browser || speechServices; const referenceGrammarId = speechServices; const telemetry = speechServices; return { browser, bundle, customSpeech, customVoice, dynamicPhrases, inverseTextNormalization, maxAlternatives, npm, referenceGrammarId, speechServices, telemetry }; }