web-speech-cognitive-services 7.1.4-master.151bc9b → 8.0.0-main.15b930d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/web-speech-cognitive-services.d.mts +329 -0
  2. package/dist/web-speech-cognitive-services.d.ts +329 -0
  3. package/dist/web-speech-cognitive-services.development.js +25746 -0
  4. package/dist/web-speech-cognitive-services.development.js.map +1 -0
  5. package/dist/web-speech-cognitive-services.js +1409 -0
  6. package/dist/web-speech-cognitive-services.js.map +1 -0
  7. package/dist/web-speech-cognitive-services.mjs +1374 -0
  8. package/dist/web-speech-cognitive-services.mjs.map +1 -0
  9. package/dist/web-speech-cognitive-services.production.min.js +31 -0
  10. package/dist/web-speech-cognitive-services.production.min.js.map +1 -0
  11. package/package.json +67 -47
  12. package/CHANGELOG.md +0 -372
  13. package/lib/BingSpeech/SpeechToText/SpeechGrammarList.js +0 -94
  14. package/lib/BingSpeech/SpeechToText/SpeechGrammarList.js.map +0 -1
  15. package/lib/BingSpeech/SpeechToText/createSpeechRecognitionPonyfill.js +0 -483
  16. package/lib/BingSpeech/SpeechToText/createSpeechRecognitionPonyfill.js.map +0 -1
  17. package/lib/BingSpeech/SpeechToText.js +0 -14
  18. package/lib/BingSpeech/SpeechToText.js.map +0 -1
  19. package/lib/BingSpeech/TextToSpeech/AudioContextConsumer.js +0 -122
  20. package/lib/BingSpeech/TextToSpeech/AudioContextConsumer.js.map +0 -1
  21. package/lib/BingSpeech/TextToSpeech/AudioContextQueue.js +0 -104
  22. package/lib/BingSpeech/TextToSpeech/AudioContextQueue.js.map +0 -1
  23. package/lib/BingSpeech/TextToSpeech/SpeechSynthesisUtterance.js +0 -264
  24. package/lib/BingSpeech/TextToSpeech/SpeechSynthesisUtterance.js.map +0 -1
  25. package/lib/BingSpeech/TextToSpeech/SpeechSynthesisVoice.js +0 -61
  26. package/lib/BingSpeech/TextToSpeech/SpeechSynthesisVoice.js.map +0 -1
  27. package/lib/BingSpeech/TextToSpeech/buildSSML.js +0 -32
  28. package/lib/BingSpeech/TextToSpeech/buildSSML.js.map +0 -1
  29. package/lib/BingSpeech/TextToSpeech/createSpeechSynthesisPonyfill.js +0 -220
  30. package/lib/BingSpeech/TextToSpeech/createSpeechSynthesisPonyfill.js.map +0 -1
  31. package/lib/BingSpeech/TextToSpeech/fetchSpeechData.js +0 -74
  32. package/lib/BingSpeech/TextToSpeech/fetchSpeechData.js.map +0 -1
  33. package/lib/BingSpeech/TextToSpeech/fetchVoices.js +0 -335
  34. package/lib/BingSpeech/TextToSpeech/fetchVoices.js.map +0 -1
  35. package/lib/BingSpeech/TextToSpeech/isSSML.js +0 -13
  36. package/lib/BingSpeech/TextToSpeech/isSSML.js.map +0 -1
  37. package/lib/BingSpeech/TextToSpeech/subscribeEvent.js +0 -14
  38. package/lib/BingSpeech/TextToSpeech/subscribeEvent.js.map +0 -1
  39. package/lib/BingSpeech/TextToSpeech.js +0 -14
  40. package/lib/BingSpeech/TextToSpeech.js.map +0 -1
  41. package/lib/BingSpeech/Util/DOMEventEmitter.js +0 -61
  42. package/lib/BingSpeech/Util/DOMEventEmitter.js.map +0 -1
  43. package/lib/BingSpeech/Util/createFetchTokenUsingSubscriptionKey.js +0 -41
  44. package/lib/BingSpeech/Util/createFetchTokenUsingSubscriptionKey.js.map +0 -1
  45. package/lib/BingSpeech/fetchAuthorizationToken.js +0 -57
  46. package/lib/BingSpeech/fetchAuthorizationToken.js.map +0 -1
  47. package/lib/BingSpeech/index.js +0 -84
  48. package/lib/BingSpeech/index.js.map +0 -1
  49. package/lib/SpeechServices/SpeechSDK.js +0 -19
  50. package/lib/SpeechServices/SpeechSDK.js.map +0 -1
  51. package/lib/SpeechServices/SpeechToText/SpeechGrammarList.js +0 -45
  52. package/lib/SpeechServices/SpeechToText/SpeechGrammarList.js.map +0 -1
  53. package/lib/SpeechServices/SpeechToText/cognitiveServiceEventResultToWebSpeechRecognitionResultList.js +0 -56
  54. package/lib/SpeechServices/SpeechToText/cognitiveServiceEventResultToWebSpeechRecognitionResultList.js.map +0 -1
  55. package/lib/SpeechServices/SpeechToText/createSpeechRecognitionPonyfill.js +0 -984
  56. package/lib/SpeechServices/SpeechToText/createSpeechRecognitionPonyfill.js.map +0 -1
  57. package/lib/SpeechServices/SpeechToText.js +0 -24
  58. package/lib/SpeechServices/SpeechToText.js.map +0 -1
  59. package/lib/SpeechServices/TextToSpeech/AudioContextConsumer.js +0 -92
  60. package/lib/SpeechServices/TextToSpeech/AudioContextConsumer.js.map +0 -1
  61. package/lib/SpeechServices/TextToSpeech/AudioContextQueue.js +0 -111
  62. package/lib/SpeechServices/TextToSpeech/AudioContextQueue.js.map +0 -1
  63. package/lib/SpeechServices/TextToSpeech/SpeechSynthesisEvent.js +0 -40
  64. package/lib/SpeechServices/TextToSpeech/SpeechSynthesisEvent.js.map +0 -1
  65. package/lib/SpeechServices/TextToSpeech/SpeechSynthesisUtterance.js +0 -283
  66. package/lib/SpeechServices/TextToSpeech/SpeechSynthesisUtterance.js.map +0 -1
  67. package/lib/SpeechServices/TextToSpeech/SpeechSynthesisVoice.js +0 -63
  68. package/lib/SpeechServices/TextToSpeech/SpeechSynthesisVoice.js.map +0 -1
  69. package/lib/SpeechServices/TextToSpeech/buildSSML.js +0 -32
  70. package/lib/SpeechServices/TextToSpeech/buildSSML.js.map +0 -1
  71. package/lib/SpeechServices/TextToSpeech/createSpeechSynthesisPonyfill.js +0 -282
  72. package/lib/SpeechServices/TextToSpeech/createSpeechSynthesisPonyfill.js.map +0 -1
  73. package/lib/SpeechServices/TextToSpeech/fetchCustomVoices.js +0 -110
  74. package/lib/SpeechServices/TextToSpeech/fetchCustomVoices.js.map +0 -1
  75. package/lib/SpeechServices/TextToSpeech/fetchSpeechData.js +0 -127
  76. package/lib/SpeechServices/TextToSpeech/fetchSpeechData.js.map +0 -1
  77. package/lib/SpeechServices/TextToSpeech/fetchVoices.js +0 -87
  78. package/lib/SpeechServices/TextToSpeech/fetchVoices.js.map +0 -1
  79. package/lib/SpeechServices/TextToSpeech/isSSML.js +0 -13
  80. package/lib/SpeechServices/TextToSpeech/isSSML.js.map +0 -1
  81. package/lib/SpeechServices/TextToSpeech/subscribeEvent.js +0 -14
  82. package/lib/SpeechServices/TextToSpeech/subscribeEvent.js.map +0 -1
  83. package/lib/SpeechServices/TextToSpeech.js +0 -14
  84. package/lib/SpeechServices/TextToSpeech.js.map +0 -1
  85. package/lib/SpeechServices/fetchAuthorizationToken.js +0 -58
  86. package/lib/SpeechServices/fetchAuthorizationToken.js.map +0 -1
  87. package/lib/SpeechServices/patchOptions.js +0 -213
  88. package/lib/SpeechServices/patchOptions.js.map +0 -1
  89. package/lib/SpeechServices/resolveFunctionOrReturnValue.js +0 -11
  90. package/lib/SpeechServices/resolveFunctionOrReturnValue.js.map +0 -1
  91. package/lib/SpeechServices.js +0 -73
  92. package/lib/SpeechServices.js.map +0 -1
  93. package/lib/Util/arrayToMap.js +0 -28
  94. package/lib/Util/arrayToMap.js.map +0 -1
  95. package/lib/Util/createPromiseQueue.js +0 -40
  96. package/lib/Util/createPromiseQueue.js.map +0 -1
  97. package/lib/index.js +0 -14
  98. package/lib/index.js.map +0 -1
  99. package/umd/web-speech-cognitive-services.development.js +0 -4740
  100. package/umd/web-speech-cognitive-services.production.min.js +0 -2
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchVoices.js","names":["SpeechSynthesisVoice","lang","gender","voiceURI"],"sources":["../../../src/BingSpeech/TextToSpeech/fetchVoices.js"],"sourcesContent":["import SpeechSynthesisVoice from './SpeechSynthesisVoice';\n\nexport default function () {\n return [\n new SpeechSynthesisVoice({ lang: 'ar-EG', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ar-EG, Hoda)' }),\n new SpeechSynthesisVoice({ lang: 'ar-SA', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ar-SA, Naayf)' }),\n new SpeechSynthesisVoice({ lang: 'bg-BG', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (bg-BG, Ivan)' }),\n new SpeechSynthesisVoice({ lang: 'ca-ES', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ca-ES, HerenaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'cs-CZ', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (cs-CZ, Jakub)' }),\n new SpeechSynthesisVoice({ lang: 'da-DK', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (da-DK, HelleRUS)' }),\n new SpeechSynthesisVoice({ lang: 'de-AT', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (de-AT, Michael)' }),\n new SpeechSynthesisVoice({ lang: 'de-CH', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (de-CH, Karsten)' }),\n new SpeechSynthesisVoice({ lang: 'de-DE', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (de-DE, Hedda)' }),\n new SpeechSynthesisVoice({ lang: 'de-DE', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (de-DE, HeddaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'de-DE', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (de-DE, Stefan, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'el-GR', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (el-GR, Stefanos)' }),\n new SpeechSynthesisVoice({ lang: 'en-AU', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-AU, Catherine)' }),\n new SpeechSynthesisVoice({ lang: 'en-AU', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-AU, HayleyRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-CA', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-CA, Linda)' }),\n new SpeechSynthesisVoice({ lang: 'en-CA', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-CA, HeatherRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-GB', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-GB, Susan, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'en-GB', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-GB, HazelRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-GB', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-GB, George, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'en-IE', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-IE, Sean)' }),\n new SpeechSynthesisVoice({ lang: 'en-IN', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-IN, Heera, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'en-IN', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-IN, PriyaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-IN', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-IN, Ravi, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'en-US', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-US, ZiraRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-US', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-US', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-US, BenjaminRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-US', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-US, Jessa24kRUS)' }),\n new SpeechSynthesisVoice({ lang: 'en-US', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (en-US, Guy24kRUS)' }),\n new SpeechSynthesisVoice({ lang: 'es-ES', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (es-ES, Laura, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'es-ES', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (es-ES, HelenaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'es-ES', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (es-ES, Pablo, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'es-MX', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (es-MX, HildaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'es-MX', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (es-MX, Raul, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'fi-FI', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (fi-FI, HeidiRUS)' }),\n new SpeechSynthesisVoice({ lang: 'fr-CA', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (fr-CA, Caroline)' }),\n new SpeechSynthesisVoice({ lang: 'fr-CA', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (fr-CA, HarmonieRUS)' }),\n new SpeechSynthesisVoice({ lang: 'fr-CH', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (fr-CH, Guillaume)' }),\n new SpeechSynthesisVoice({ lang: 'fr-FR', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (fr-FR, Julie, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'fr-FR', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (fr-FR, HortenseRUS)' }),\n new SpeechSynthesisVoice({ lang: 'fr-FR', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (fr-FR, Paul, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'he-IL', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (he-IL, Asaf)' }),\n new SpeechSynthesisVoice({ lang: 'hi-IN', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (hi-IN, Kalpana, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'hi-IN', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (hi-IN, Kalpana)' }),\n new SpeechSynthesisVoice({ lang: 'hi-IN', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (hi-IN, Hemant)' }),\n new SpeechSynthesisVoice({ lang: 'hr-HR', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (hr-HR, Matej)' }),\n new SpeechSynthesisVoice({ lang: 'hu-HU', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (hu-HU, Szabolcs)' }),\n new SpeechSynthesisVoice({ lang: 'id-ID', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (id-ID, Andika)' }),\n new SpeechSynthesisVoice({ lang: 'it-IT', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (it-IT, Cosimo, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'it-IT', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (it-IT, LuciaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'ja-JP', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ja-JP, Ayumi, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'ja-JP', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ja-JP, Ichiro, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'ja-JP', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ja-JP, HarukaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'ko-KR', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ko-KR, HeamiRUS)' }),\n new SpeechSynthesisVoice({ lang: 'ms-MY', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ms-MY, Rizwan)' }),\n new SpeechSynthesisVoice({ lang: 'nb-NO', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (nb-NO, HuldaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'nl-NL', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (nl-NL, HannaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'pl-PL', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (pl-PL, PaulinaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'pt-BR', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (pt-BR, HeloisaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'pt-BR', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (pt-BR, Daniel, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'pt-PT', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (pt-PT, HeliaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'ro-RO', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ro-RO, Andrei)' }),\n new SpeechSynthesisVoice({ lang: 'ru-RU', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ru-RU, Irina, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'ru-RU', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ru-RU, Pavel, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'ru-RU', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ru-RU, EkaterinaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'sk-SK', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (sk-SK, Filip)' }),\n new SpeechSynthesisVoice({ lang: 'sl-SI', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (sl-SI, Lado)' }),\n new SpeechSynthesisVoice({ lang: 'sv-SE', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (sv-SE, HedvigRUS)' }),\n new SpeechSynthesisVoice({ lang: 'ta-IN', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (ta-IN, Valluvar)' }),\n new SpeechSynthesisVoice({ lang: 'th-TH', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (th-TH, Pattara)' }),\n new SpeechSynthesisVoice({ lang: 'tr-TR', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (tr-TR, SedaRUS)' }),\n new SpeechSynthesisVoice({ lang: 'vi-VN', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (vi-VN, An)' }),\n new SpeechSynthesisVoice({ lang: 'zh-CN', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-CN, HuihuiRUS)' }),\n new SpeechSynthesisVoice({ lang: 'zh-CN', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-CN, Yaoyao, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'zh-CN', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-CN, Kangkang, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'zh-HK', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-HK, Tracy, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'zh-HK', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-HK, TracyRUS)' }),\n new SpeechSynthesisVoice({ lang: 'zh-HK', gender: 'Male', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-HK, Danny, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'zh-TW', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-TW, Yating, Apollo)' }),\n new SpeechSynthesisVoice({ lang: 'zh-TW', gender: 'Female', voiceURI: 'Microsoft Server Speech Text to Speech Voice (zh-TW, HanHanRUS)' }),\n new SpeechSynthesisVoice({ lang: 'zh-TW', gender: 'Male', voiceURI: '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,QAAzB;IAAmCC,QAAQ,EAAE;EAA7C,CAAzB,CA9EK,EA+EL,IAAIH,6BAAJ,CAAyB;IAAEC,IAAI,EAAE,OAAR;IAAiBC,MAAM,EAAE,QAAzB;IAAmCC,QAAQ,EAAE;EAA7C,CAAzB,CA/EK,EAgFL,IAAIH,6BAAJ,CAAyB;IAAEC,IAAI,EAAE,OAAR;IAAiBC,MAAM,EAAE,MAAzB;IAAiCC,QAAQ,EAAE;EAA3C,CAAzB,CAhFK,CAAP;AAkFD"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = isSSML;
7
- var SPEAK_TAG_PATTERN = /^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*<speak[\t-\r >\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/;
8
- var XML_PROLOG_PATTERN = /^[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*<?xml[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/;
9
-
10
- function isSSML(text) {
11
- return SPEAK_TAG_PATTERN.test(text) || XML_PROLOG_PATTERN.test(text);
12
- }
13
- //# sourceMappingURL=isSSML.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isSSML.js","names":["SPEAK_TAG_PATTERN","XML_PROLOG_PATTERN","isSSML","text","test"],"sources":["../../../src/BingSpeech/TextToSpeech/isSSML.js"],"sourcesContent":["const SPEAK_TAG_PATTERN = /^\\s*<speak[\\s>]/u;\nconst XML_PROLOG_PATTERN = /^\\s*<?xml\\s/u;\n\nexport default function isSSML(text) {\n return SPEAK_TAG_PATTERN.test(text) || XML_PROLOG_PATTERN.test(text);\n}\n"],"mappings":";;;;;;AAAA,IAAMA,iBAAiB,GAAG,iJAA1B;AACA,IAAMC,kBAAkB,GAAG,+IAA3B;;AAEe,SAASC,MAAT,CAAgBC,IAAhB,EAAsB;EACnC,OAAOH,iBAAiB,CAACI,IAAlB,CAAuBD,IAAvB,KAAgCF,kBAAkB,CAACG,IAAnB,CAAwBD,IAAxB,CAAvC;AACD"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = subscribeEvent;
7
-
8
- function subscribeEvent(target, name, handler) {
9
- target.addEventListener(name, handler);
10
- return function () {
11
- return target.removeEventListener(name, handler);
12
- };
13
- }
14
- //# sourceMappingURL=subscribeEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subscribeEvent.js","names":["subscribeEvent","target","name","handler","addEventListener","removeEventListener"],"sources":["../../../src/BingSpeech/TextToSpeech/subscribeEvent.js"],"sourcesContent":["export default function subscribeEvent(target, name, handler) {\n target.addEventListener(name, handler);\n\n return () => target.removeEventListener(name, handler);\n}\n"],"mappings":";;;;;;;AAAe,SAASA,cAAT,CAAwBC,MAAxB,EAAgCC,IAAhC,EAAsCC,OAAtC,EAA+C;EAC5DF,MAAM,CAACG,gBAAP,CAAwBF,IAAxB,EAA8BC,OAA9B;EAEA,OAAO;IAAA,OAAMF,MAAM,CAACI,mBAAP,CAA2BH,IAA3B,EAAiCC,OAAjC,CAAN;EAAA,CAAP;AACD"}
@@ -1,14 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _createSpeechSynthesisPonyfill = _interopRequireDefault(require("./TextToSpeech/createSpeechSynthesisPonyfill"));
11
-
12
- var _default = _createSpeechSynthesisPonyfill.default;
13
- exports.default = _default;
14
- //# sourceMappingURL=TextToSpeech.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextToSpeech.js","names":["createSpeechSynthesisPonyfill"],"sources":["../../src/BingSpeech/TextToSpeech.js"],"sourcesContent":["import createSpeechSynthesisPonyfill from './TextToSpeech/createSpeechSynthesisPonyfill';\n\nexport default createSpeechSynthesisPonyfill\n"],"mappings":";;;;;;;;;AAAA;;eAEeA,sC"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
-
14
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
-
16
- var _events = _interopRequireDefault(require("events"));
17
-
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
- var _default = /*#__PURE__*/function () {
23
- function _default() {
24
- var _this = this;
25
-
26
- var events = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
27
- (0, _classCallCheck2.default)(this, _default);
28
- this._events = new _events.default();
29
- events.forEach(function (name) {
30
- _this._events.addListener(name, function (event) {
31
- var handler = _this["on".concat(name)];
32
-
33
- handler && handler.call(_this, event);
34
- });
35
- });
36
- }
37
-
38
- (0, _createClass2.default)(_default, [{
39
- key: "addEventListener",
40
- value: function addEventListener(name, listener) {
41
- this._events.addListener(name, listener);
42
- }
43
- }, {
44
- key: "removeEventListener",
45
- value: function removeEventListener(name, listener) {
46
- name ? this._events.removeListener(name, listener) : this._events.removeAllListeners(name);
47
- }
48
- }, {
49
- key: "emit",
50
- value: function emit(name, event) {
51
- this._events.emit(name, _objectSpread(_objectSpread({}, event), {}, {
52
- target: this,
53
- type: name
54
- }));
55
- }
56
- }]);
57
- return _default;
58
- }();
59
-
60
- exports.default = _default;
61
- //# sourceMappingURL=DOMEventEmitter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DOMEventEmitter.js","names":["events","_events","EventEmitter","forEach","name","addListener","event","handler","call","listener","removeListener","removeAllListeners","emit","target","type"],"sources":["../../../src/BingSpeech/Util/DOMEventEmitter.js"],"sourcesContent":["import EventEmitter from 'events';\n\nexport default class {\n constructor(events = []) {\n this._events = new EventEmitter();\n\n events.forEach(name => {\n this._events.addListener(name, event => {\n const handler = this[`on${ name }`];\n\n handler && handler.call(this, event);\n });\n });\n }\n\n addEventListener(name, listener) {\n this._events.addListener(name, listener);\n }\n\n removeEventListener(name, listener) {\n name ? this._events.removeListener(name, listener) : this._events.removeAllListeners(name);\n }\n\n emit(name, event) {\n this._events.emit(name, {\n ...event,\n target: this,\n type: name\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;EAGE,oBAAyB;IAAA;;IAAA,IAAbA,MAAa,uEAAJ,EAAI;IAAA;IACvB,KAAKC,OAAL,GAAe,IAAIC,eAAJ,EAAf;IAEAF,MAAM,CAACG,OAAP,CAAe,UAAAC,IAAI,EAAI;MACrB,KAAI,CAACH,OAAL,CAAaI,WAAb,CAAyBD,IAAzB,EAA+B,UAAAE,KAAK,EAAI;QACtC,IAAMC,OAAO,GAAG,KAAI,aAAOH,IAAP,EAApB;;QAEAG,OAAO,IAAIA,OAAO,CAACC,IAAR,CAAa,KAAb,EAAmBF,KAAnB,CAAX;MACD,CAJD;IAKD,CAND;EAOD;;;;WAED,0BAAiBF,IAAjB,EAAuBK,QAAvB,EAAiC;MAC/B,KAAKR,OAAL,CAAaI,WAAb,CAAyBD,IAAzB,EAA+BK,QAA/B;IACD;;;WAED,6BAAoBL,IAApB,EAA0BK,QAA1B,EAAoC;MAClCL,IAAI,GAAG,KAAKH,OAAL,CAAaS,cAAb,CAA4BN,IAA5B,EAAkCK,QAAlC,CAAH,GAAiD,KAAKR,OAAL,CAAaU,kBAAb,CAAgCP,IAAhC,CAArD;IACD;;;WAED,cAAKA,IAAL,EAAWE,KAAX,EAAkB;MAChB,KAAKL,OAAL,CAAaW,IAAb,CAAkBR,IAAlB,kCACKE,KADL;QAEEO,MAAM,EAAE,IAFV;QAGEC,IAAI,EAAEV;MAHR;IAKD"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _fetchAuthorizationToken = _interopRequireDefault(require("../fetchAuthorizationToken"));
11
-
12
- // Token expiration is hardcoded at 10 minutes
13
- // https://docs.microsoft.com/en-us/azure/cognitive-services/Speech/how-to/how-to-authentication?tabs=Powershell#use-an-authorization-token
14
- var TOKEN_EXPIRATION = 600000;
15
- var TOKEN_EARLY_RENEWAL = 60000;
16
-
17
- var _default = function _default(subscriptionKey) {
18
- var lastRenew = 0;
19
- var accessTokenPromise = null;
20
- return function () {
21
- if (!lastRenew) {
22
- console.warn('Subscription key token exchange is not recommended for production code. It will leak your subscription key to the client.');
23
- }
24
-
25
- var now = Date.now();
26
-
27
- if (!accessTokenPromise || now - lastRenew > TOKEN_EXPIRATION - TOKEN_EARLY_RENEWAL) {
28
- lastRenew = now;
29
- accessTokenPromise = (0, _fetchAuthorizationToken.default)(subscriptionKey).catch(function (err) {
30
- // Force to renew on next fetch
31
- lastRenew = 0;
32
- return Promise.reject(err);
33
- });
34
- }
35
-
36
- return accessTokenPromise;
37
- };
38
- };
39
-
40
- exports.default = _default;
41
- //# sourceMappingURL=createFetchTokenUsingSubscriptionKey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createFetchTokenUsingSubscriptionKey.js","names":["TOKEN_EXPIRATION","TOKEN_EARLY_RENEWAL","subscriptionKey","lastRenew","accessTokenPromise","console","warn","now","Date","fetchAuthorizationToken","catch","err","Promise","reject"],"sources":["../../../src/BingSpeech/Util/createFetchTokenUsingSubscriptionKey.js"],"sourcesContent":["import fetchAuthorizationToken from '../fetchAuthorizationToken';\n\n// Token expiration is hardcoded at 10 minutes\n// https://docs.microsoft.com/en-us/azure/cognitive-services/Speech/how-to/how-to-authentication?tabs=Powershell#use-an-authorization-token\nconst TOKEN_EXPIRATION = 600000;\nconst TOKEN_EARLY_RENEWAL = 60000;\n\nexport default subscriptionKey => {\n let lastRenew = 0;\n let accessTokenPromise = null;\n\n return () => {\n if (!lastRenew) {\n console.warn('Subscription key token exchange is not recommended for production code. It will leak your subscription key to the client.');\n }\n\n const now = Date.now();\n\n if (!accessTokenPromise || now - lastRenew > TOKEN_EXPIRATION - TOKEN_EARLY_RENEWAL) {\n lastRenew = now;\n\n accessTokenPromise = fetchAuthorizationToken(subscriptionKey).catch(err => {\n // Force to renew on next fetch\n lastRenew = 0;\n\n return Promise.reject(err);\n });\n }\n\n return accessTokenPromise;\n }\n}\n"],"mappings":";;;;;;;;;AAAA;;AAEA;AACA;AACA,IAAMA,gBAAgB,GAAG,MAAzB;AACA,IAAMC,mBAAmB,GAAG,KAA5B;;eAEe,kBAAAC,eAAe,EAAI;EAChC,IAAIC,SAAS,GAAG,CAAhB;EACA,IAAIC,kBAAkB,GAAG,IAAzB;EAEA,OAAO,YAAM;IACX,IAAI,CAACD,SAAL,EAAgB;MACdE,OAAO,CAACC,IAAR,CAAa,2HAAb;IACD;;IAED,IAAMC,GAAG,GAAGC,IAAI,CAACD,GAAL,EAAZ;;IAEA,IAAI,CAACH,kBAAD,IAAuBG,GAAG,GAAGJ,SAAN,GAAkBH,gBAAgB,GAAGC,mBAAhE,EAAqF;MACnFE,SAAS,GAAGI,GAAZ;MAEAH,kBAAkB,GAAG,IAAAK,gCAAA,EAAwBP,eAAxB,EAAyCQ,KAAzC,CAA+C,UAAAC,GAAG,EAAI;QACzE;QACAR,SAAS,GAAG,CAAZ;QAEA,OAAOS,OAAO,CAACC,MAAR,CAAeF,GAAf,CAAP;MACD,CALoB,CAArB;IAMD;;IAED,OAAOP,kBAAP;EACD,CAnBD;AAoBD,C"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = _default;
9
-
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
-
12
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
-
14
- var TOKEN_URL = 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken';
15
-
16
- function _default(_x) {
17
- return _ref.apply(this, arguments);
18
- }
19
-
20
- function _ref() {
21
- _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(subscriptionKey) {
22
- var res;
23
- return _regenerator.default.wrap(function _callee$(_context) {
24
- while (1) {
25
- switch (_context.prev = _context.next) {
26
- case 0:
27
- _context.next = 2;
28
- return fetch(TOKEN_URL, {
29
- headers: {
30
- 'Ocp-Apim-Subscription-Key': subscriptionKey
31
- },
32
- method: 'POST'
33
- });
34
-
35
- case 2:
36
- res = _context.sent;
37
-
38
- if (!(res.status !== 200)) {
39
- _context.next = 5;
40
- break;
41
- }
42
-
43
- throw new Error("Failed to fetch speech token, server returned ".concat(res.status));
44
-
45
- case 5:
46
- return _context.abrupt("return", res.text());
47
-
48
- case 6:
49
- case "end":
50
- return _context.stop();
51
- }
52
- }
53
- }, _callee);
54
- }));
55
- return _ref.apply(this, arguments);
56
- }
57
- //# sourceMappingURL=fetchAuthorizationToken.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchAuthorizationToken.js","names":["TOKEN_URL","subscriptionKey","fetch","headers","method","res","status","Error","text"],"sources":["../../src/BingSpeech/fetchAuthorizationToken.js"],"sourcesContent":["const TOKEN_URL = 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken';\n\nexport default async function (subscriptionKey) {\n const res = await fetch(TOKEN_URL, {\n headers: {\n 'Ocp-Apim-Subscription-Key': subscriptionKey\n },\n method: 'POST'\n });\n\n if (res.status !== 200) {\n throw new Error(`Failed to fetch speech token, server returned ${ res.status }`);\n }\n\n return res.text();\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAMA,SAAS,GAAG,yDAAlB;;;;;;;iFAEe,iBAAgBC,eAAhB;IAAA;IAAA;MAAA;QAAA;UAAA;YAAA;YAAA,OACKC,KAAK,CAACF,SAAD,EAAY;cACjCG,OAAO,EAAE;gBACP,6BAA6BF;cADtB,CADwB;cAIjCG,MAAM,EAAE;YAJyB,CAAZ,CADV;;UAAA;YACPC,GADO;;YAAA,MAQTA,GAAG,CAACC,MAAJ,KAAe,GARN;cAAA;cAAA;YAAA;;YAAA,MASL,IAAIC,KAAJ,yDAA4DF,GAAG,CAACC,MAAhE,EATK;;UAAA;YAAA,iCAYND,GAAG,CAACG,IAAJ,EAZM;;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C"}
@@ -1,84 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- Object.defineProperty(exports, "createSpeechRecognitionPonyfill", {
9
- enumerable: true,
10
- get: function get() {
11
- return _createSpeechRecognitionPonyfill.default;
12
- }
13
- });
14
- Object.defineProperty(exports, "createSpeechSynthesisPonyfill", {
15
- enumerable: true,
16
- get: function get() {
17
- return _createSpeechSynthesisPonyfill.default;
18
- }
19
- });
20
- exports.default = _default;
21
- Object.defineProperty(exports, "fetchAuthorizationToken", {
22
- enumerable: true,
23
- get: function get() {
24
- return _fetchAuthorizationToken.default;
25
- }
26
- });
27
-
28
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
29
-
30
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
31
-
32
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
33
-
34
- var _createSpeechRecognitionPonyfill = _interopRequireDefault(require("./SpeechToText/createSpeechRecognitionPonyfill"));
35
-
36
- var _createSpeechSynthesisPonyfill = _interopRequireDefault(require("./TextToSpeech/createSpeechSynthesisPonyfill"));
37
-
38
- var _fetchAuthorizationToken = _interopRequireDefault(require("./fetchAuthorizationToken"));
39
-
40
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
41
-
42
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
43
-
44
- function _default() {
45
- return _ref.apply(this, arguments);
46
- }
47
-
48
- function _ref() {
49
- _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
50
- var _args = arguments;
51
- return _regenerator.default.wrap(function _callee$(_context) {
52
- while (1) {
53
- switch (_context.prev = _context.next) {
54
- case 0:
55
- _context.t0 = _objectSpread;
56
- _context.t1 = _objectSpread;
57
- _context.t2 = {};
58
- _context.next = 5;
59
- return _createSpeechRecognitionPonyfill.default.apply(void 0, _args);
60
-
61
- case 5:
62
- _context.t3 = _context.sent;
63
- _context.t4 = (0, _context.t1)(_context.t2, _context.t3);
64
- _context.next = 9;
65
- return _createSpeechSynthesisPonyfill.default.apply(void 0, _args);
66
-
67
- case 9:
68
- _context.t5 = _context.sent;
69
- _context.next = 12;
70
- return (0, _context.t0)(_context.t4, _context.t5);
71
-
72
- case 12:
73
- return _context.abrupt("return", _context.sent);
74
-
75
- case 13:
76
- case "end":
77
- return _context.stop();
78
- }
79
- }
80
- }, _callee);
81
- }));
82
- return _ref.apply(this, arguments);
83
- }
84
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["createSpeechRecognitionPonyfill","createSpeechSynthesisPonyfill"],"sources":["../../src/BingSpeech/index.js"],"sourcesContent":["import createSpeechRecognitionPonyfill from './SpeechToText/createSpeechRecognitionPonyfill';\nimport createSpeechSynthesisPonyfill from './TextToSpeech/createSpeechSynthesisPonyfill';\nimport fetchAuthorizationToken from './fetchAuthorizationToken';\n\nexport default async function (...args) {\n return await {\n ...(await createSpeechRecognitionPonyfill(...args)),\n ...(await createSpeechSynthesisPonyfill(...args))\n };\n}\n\nexport {\n createSpeechRecognitionPonyfill,\n createSpeechSynthesisPonyfill,\n fetchAuthorizationToken\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;iFAEe;IAAA;IAAA;MAAA;QAAA;UAAA;YAAA;YAAA;YAAA;YAAA;YAAA,OAEDA,wCAAA,qBAFC;;UAAA;YAAA;YAAA;YAAA;YAAA,OAGDC,sCAAA,qBAHC;;UAAA;YAAA;YAAA;YAAA;;UAAA;YAAA;;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA;EAAA,C"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _microsoftCognitiveservicesSpeech = require("microsoft-cognitiveservices-speech-sdk/distrib/lib/microsoft.cognitiveservices.speech.sdk");
9
-
10
- // We are only importing what we need.
11
- var _default = {
12
- AudioConfig: _microsoftCognitiveservicesSpeech.AudioConfig,
13
- OutputFormat: _microsoftCognitiveservicesSpeech.OutputFormat,
14
- ResultReason: _microsoftCognitiveservicesSpeech.ResultReason,
15
- SpeechConfig: _microsoftCognitiveservicesSpeech.SpeechConfig,
16
- SpeechRecognizer: _microsoftCognitiveservicesSpeech.SpeechRecognizer
17
- };
18
- exports.default = _default;
19
- //# sourceMappingURL=SpeechSDK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpeechSDK.js","names":["AudioConfig","OutputFormat","ResultReason","SpeechConfig","SpeechRecognizer"],"sources":["../../src/SpeechServices/SpeechSDK.js"],"sourcesContent":["// We are only importing what we need.\n\nimport {\n AudioConfig,\n OutputFormat,\n ResultReason,\n SpeechConfig,\n SpeechRecognizer\n} from 'microsoft-cognitiveservices-speech-sdk/distrib/lib/microsoft.cognitiveservices.speech.sdk';\n\nexport default {\n AudioConfig,\n OutputFormat,\n ResultReason,\n SpeechConfig,\n SpeechRecognizer\n};\n"],"mappings":";;;;;;;AAEA;;AAFA;eAUe;EACbA,WAAW,EAAXA,6CADa;EAEbC,YAAY,EAAZA,8CAFa;EAGbC,YAAY,EAAZA,8CAHa;EAIbC,YAAY,EAAZA,8CAJa;EAKbC,gBAAgB,EAAhBA;AALa,C"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
- /* eslint class-methods-use-this: "off" */
15
- var _default = /*#__PURE__*/function () {
16
- function _default() {
17
- (0, _classCallCheck2.default)(this, _default);
18
- this._phrases = [];
19
- }
20
-
21
- (0, _createClass2.default)(_default, [{
22
- key: "addFromString",
23
- value: function addFromString() {
24
- throw new Error('JSGF is not supported');
25
- }
26
- }, {
27
- key: "phrases",
28
- get: function get() {
29
- return this._phrases;
30
- },
31
- set: function set(value) {
32
- if (Array.isArray(value)) {
33
- this._phrases = value;
34
- } else if (typeof value === 'string') {
35
- this._phrases = [value];
36
- } else {
37
- throw new Error("The provided value is not an array or of type 'string'");
38
- }
39
- }
40
- }]);
41
- return _default;
42
- }();
43
-
44
- exports.default = _default;
45
- //# sourceMappingURL=SpeechGrammarList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpeechGrammarList.js","names":["_phrases","Error","value","Array","isArray"],"sources":["../../../src/SpeechServices/SpeechToText/SpeechGrammarList.js"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n\nexport default class {\n constructor() {\n this._phrases = [];\n }\n\n addFromString() {\n throw new Error('JSGF is not supported');\n }\n\n get phrases() {\n return this._phrases;\n }\n\n set phrases(value) {\n if (Array.isArray(value)) {\n this._phrases = value;\n } else if (typeof value === 'string') {\n this._phrases = [value];\n } else {\n throw new Error(`The provided value is not an array or of type 'string'`);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;;EAGE,oBAAc;IAAA;IACZ,KAAKA,QAAL,GAAgB,EAAhB;EACD;;;;WAED,yBAAgB;MACd,MAAM,IAAIC,KAAJ,CAAU,uBAAV,CAAN;IACD;;;SAED,eAAc;MACZ,OAAO,KAAKD,QAAZ;IACD,C;SAED,aAAYE,KAAZ,EAAmB;MACjB,IAAIC,KAAK,CAACC,OAAN,CAAcF,KAAd,CAAJ,EAA0B;QACxB,KAAKF,QAAL,GAAgBE,KAAhB;MACD,CAFD,MAEO,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;QACpC,KAAKF,QAAL,GAAgB,CAACE,KAAD,CAAhB;MACD,CAFM,MAEA;QACL,MAAM,IAAID,KAAJ,0DAAN;MACD;IACF"}
@@ -1,56 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = _default;
9
-
10
- var _arrayToMap = _interopRequireDefault(require("../../Util/arrayToMap"));
11
-
12
- var _SpeechSDK = _interopRequireDefault(require("../SpeechSDK"));
13
-
14
- var _SpeechSDK$ResultReas = _SpeechSDK.default.ResultReason,
15
- RecognizingSpeech = _SpeechSDK$ResultReas.RecognizingSpeech,
16
- RecognizedSpeech = _SpeechSDK$ResultReas.RecognizedSpeech;
17
-
18
- function _default(result) {
19
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
20
- _ref$maxAlternatives = _ref.maxAlternatives,
21
- maxAlternatives = _ref$maxAlternatives === void 0 ? Infinity : _ref$maxAlternatives,
22
- _ref$textNormalizatio = _ref.textNormalization,
23
- textNormalization = _ref$textNormalizatio === void 0 ? 'display' : _ref$textNormalizatio;
24
-
25
- if (result.reason === RecognizingSpeech || result.reason === RecognizedSpeech && !result.json.NBest) {
26
- var resultList = [{
27
- confidence: 0.5,
28
- transcript: result.text
29
- }];
30
-
31
- if (result.reason === RecognizedSpeech) {
32
- resultList.isFinal = true;
33
- }
34
-
35
- return resultList;
36
- } else if (result.reason === RecognizedSpeech) {
37
- var _resultList = (0, _arrayToMap.default)((result.json.NBest || []).slice(0, maxAlternatives).map(function (_ref2) {
38
- var confidence = _ref2.Confidence,
39
- display = _ref2.Display,
40
- itn = _ref2.ITN,
41
- lexical = _ref2.Lexical,
42
- maskedITN = _ref2.MaskedITN;
43
- return {
44
- confidence: confidence,
45
- transcript: textNormalization === 'itn' ? itn : textNormalization === 'lexical' ? lexical : textNormalization === 'maskeditn' ? maskedITN : display
46
- };
47
- }), {
48
- isFinal: true
49
- });
50
-
51
- return _resultList;
52
- }
53
-
54
- return [];
55
- }
56
- //# sourceMappingURL=cognitiveServiceEventResultToWebSpeechRecognitionResultList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cognitiveServiceEventResultToWebSpeechRecognitionResultList.js","names":["SpeechSDK","ResultReason","RecognizingSpeech","RecognizedSpeech","result","maxAlternatives","Infinity","textNormalization","reason","json","NBest","resultList","confidence","transcript","text","isFinal","arrayToMap","slice","map","Confidence","display","Display","itn","ITN","lexical","Lexical","maskedITN","MaskedITN"],"sources":["../../../src/SpeechServices/SpeechToText/cognitiveServiceEventResultToWebSpeechRecognitionResultList.js"],"sourcesContent":["import arrayToMap from '../../Util/arrayToMap';\nimport SpeechSDK from '../SpeechSDK';\n\nconst {\n ResultReason: { RecognizingSpeech, RecognizedSpeech }\n} = SpeechSDK;\n\nexport default function(result, { maxAlternatives = Infinity, textNormalization = 'display' } = {}) {\n if (result.reason === RecognizingSpeech || (result.reason === RecognizedSpeech && !result.json.NBest)) {\n const resultList = [\n {\n confidence: 0.5,\n transcript: result.text\n }\n ];\n\n if (result.reason === RecognizedSpeech) {\n resultList.isFinal = true;\n }\n\n return resultList;\n } else if (result.reason === RecognizedSpeech) {\n const resultList = arrayToMap(\n (result.json.NBest || [])\n .slice(0, maxAlternatives)\n .map(({ Confidence: confidence, Display: display, ITN: itn, Lexical: lexical, MaskedITN: maskedITN }) => ({\n confidence,\n transcript:\n textNormalization === 'itn'\n ? itn\n : textNormalization === 'lexical'\n ? lexical\n : textNormalization === 'maskeditn'\n ? maskedITN\n : display\n })),\n { isFinal: true }\n );\n\n return resultList;\n }\n\n return [];\n}\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA,4BAEIA,kBAFJ,CACEC,YADF;AAAA,IACkBC,iBADlB,yBACkBA,iBADlB;AAAA,IACqCC,gBADrC,yBACqCA,gBADrC;;AAIe,kBAASC,MAAT,EAAqF;EAAA,+EAAJ,EAAI;EAAA,gCA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