UNPKG

adaptive-speech-recognizer

Version:

Adaptive dictation-mode speech recognizer ponyfill compatible with WebChat that gives the user time to think and stutter/stammer.

99 lines (70 loc) 3.46 kB
<!doctype html><html lang="en-GB" class="app-page"> <title> *Adaptive speech recognition </title> <meta name="robots" content="noindex,nofollow" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta charset="utf-8"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css" /> <link rel="stylesheet" href="demo/style.css" /> <link rel="icon" href="data:," /><!-- Prevent favicon 404s! --> <h1> Adaptive speech recognition </h1> <example-recognizer-app> <form> <p> <output id="sdkVersion" aria-label="Version" aria-live="off"></output> </p> <p> <button type="submit" id="startButton">Start dictation</button> <button type="reset" id="stopButton" disabled >Stop</button> <i id="recognizer-status" title="Recognizer stopped"></i> </p> <p> <label for="result">Result</label> <output id="result" class="output"></output> </p> <p id="actions" title="(actions)"></p> <p> <label for="log">Log</label> <output id="log" aria-live="off"></output> </p> <details> <summary> <label for="options">Configuration</label> </summary> <output id="options" aria-live="off"></output> </details> </form> </example-recognizer-app> <a class="github-fork-ribbon" href="https://github.com/nfreear/dictation" data-ribbon="Fork me on GitHub" title="Fork 'nfreear/dictation' on GitHub">Fork nfreear/dictation on GitHub</a> <script type="importmap"> { "imports": { "adaptive-speech-recognizer": "./index.js", "ExampleRecognizerAppElement": "./demo/lib/example-app.js", "webApiSpeechRecogDemo": "./src/web-api-speech-recog.js", "fireMockActionsEvent": "./test/fireMockActionsEvent.js", "ms-cognitive-speech-sdk": "https://unpkg.com/microsoft-cognitiveservices-speech-sdk@1.43.1/distrib/browser/microsoft.cognitiveservices.speech.sdk.bundle-min.js" } } </script> <script type="module"> import 'ExampleRecognizerAppElement'; </script> <!-- ====================================================== --> <footer> © 2025 Nick Freear. All rights reserved. <a href="https://github.com/nfreear/dictation">source</a> </footer> <pre hidden> NDF, 08-Oct-2020. * https://gist.github.com/nfreear/f875994f45c97518cd8c42c786998c84; </pre> </html> <!-- * https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?tabs=script%2Cwindowsinstall&pivots=programming-language-javascript; * https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-sdk?tabs=browser%2Cubuntu%2Cios-xcode%2Cmac-xcode%2Candroid-studio#get-the-speech-sdk; * https://docs.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/?view=azure-node-latest * YES !! ~~ https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?tabs=script%2Cwindowsinstall&pivots=programming-language-javascript#continuous-recognition; == https://github.com/microsoft/cognitive-services-speech-sdk-js/blob/v1.13.1/src/common.browser/MicAudioSource.ts#L134-L145 >> microsoft.cognitiveservices.speech.sdk.bundle-min.js:1 undefined | undefined | privName: AudioSourceErrorEvent | privEventId: D0FFB17607834013BFD72356FC82D571 | privEventTime: 2020-10-08T14:32:25.364Z | privEventType: 3 | privMetadata: {} | privAudioSourceId: A660C16B24584A7F9FA6694F012B35DF | privError: Error occurred during microphone initialization: NotAllowedError: Permission dismissed -->