Skip to content

Commit 05c93a7

Browse files
committed
doc: Add comments to JavaScript
1 parent 773617d commit 05c93a7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/createDictationRecognizerPonyfill.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ export function toSentence (text) {
121121

122122
// ------------------------------------------------------------------
123123

124+
/**
125+
* Factory function - create SpeechRecognition class from cognitive recognizer.
126+
* @param {Function} - createRecognizer function.
127+
* @param {DictationOptions} - Options object.
128+
* @return {SpeechRecognition}
129+
*/
124130
function createSpeechRecognitionFromRecognizer (createRecognizer, options) {
125131
// Extend options with the defaults.
126132
const _OPT = { ...DEFAULTS, ...options };
@@ -553,6 +559,11 @@ function createCognitiveRecognizer (options) {
553559

554560
// ------------------------------------------------------------------
555561

562+
/**
563+
* The main function, to create an adaptive speech recognizer 'Ponyfill' object.
564+
* @param {DictationOptions} - Options object.
565+
* @return {Ponyfill}
566+
*/
556567
export function createDictationRecognizerPonyfill (options) {
557568
// WAS: const recognizer = createCognitiveRecognizer(options);
558569

0 commit comments

Comments
 (0)