All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
8.1.0 - 2025-01-06
- Added
initialSilenceTimeout
option to shorten or prolong the timeout of silence detection before speech is detected, by @compulim, in PR #232
8.0.0 - 2024-11-26
- 💥 Modernized some code with TypeScript, more type-aligned to W3C Speech API, and moved to official Event Target API, in PR #220, #224, #225, and #228
SpeechRecognitionResult
andSpeechRecognitionResultList
is now a array-like object, useArray.from()
to convert them into an array
- Updated build tools and added named exports via CJS/ESM
- Bumped dependencies, in PR #216 and #218
- Production dependencies
- Development dependencies
@types/[email protected]
@typescript-eslint/[email protected]
@typescript-eslint/[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
- Fixed #218. Speech recognition should stopping properly in some cases, in PR #218
- Interactive mode, muted microphone
- Continuous and interactive mode, stop shortly after start
- Fixed #221. Continuous mode with successful interims should stop without errors, in PR #222
- Fixed #226.
createSpeechServicesPonyfill
should return bothSpeechRecognition
andSpeechSynthesis
ponyfill, in PR #227- 💥
createSpeechServicesPonyfill
will throw if the browser does not support Media Capture and Streams API, instead of warning and continue
- 💥
7.1.3 - 2022-11-29
- Bumped dependencies, in PR #200
- Development dependencies
7.1.2 - 2022-09-27
- Bumped dependencies, in PR #196
- Production dependencies
- Development dependencies
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
7.1.1 - 2021-07-20
- Bumped dependencies, in PR #151, PR #152 and PR #153
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
7.1.0 - 2021-02-01
- Moved from
webpack-visualizer-plugin
towebpack-stats-plugin
- Bumped production dependencies
- Bumped development dependencies
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
7.0.1 - 2020-08-06
- Bumped dependencies
7.0.0 - 2020-05-27
- 💥 To enable developers to select their version of Cognitive Services Speech SDK and use newer features, we are moving
microsoft-cognitiveservices-speech-sdk
topeerDependencies
.- When you install
web-speech-cognitive-services
, you will also need to install a compatible version ofmicrosoft-cognitiveservices-speech-sdk
.
- When you install
- Fixes #96, move
microsoft-cognitiveservices-speech-sdk
topeerDependencies
, by @compulim, in PR #97
6.3.0 - 2020-03-28
- Debumped
[email protected]
, by @compulim in PR #94
6.2.0 - 2020-03-27
- 💥 Temporarily reverting breaking changes by reintroducing Bing Speech and
fetchAuthorizationToken
, by @compulim in PR #92.
6.1.0 - 2020-03-26
- Bumped dependencies, in PR #87, by @compulim
- Production dependencies
- Development dependencies
- Use
p-defer-es5
instead of adoptedcreateDeferred.js
, in PR #89.
- 💥
Bing Speech support is removed, by @compulim, in PR #87.As Bing Speech has deprecated and removed from Azure. Bing Speech support has been removed.
- 💥
fetchAuthorizationToken
is removed, by @compulim, in PR #89.fetchAuthorizationToken
is removed, please refer to this documentation on how to get an access token.
6.0.0 - 2019-12-03
playground
: Add delayed start to playground for testing speech recognition initiated outside of user gestures, in PR #78- Speech recognition: New
looseEvents
option, default isfalse
. When enabled, we will no longer follow observed browser event order. We will send finalizedresult
event as early as possible. This will not break conformance to W3C specifications. By @compulim, in PR #79 - Speech recognition: Create ponyfill using
SpeechRecognizer
object frommicrosoft-cognitiveservices-speech-sdk
, by @compulim, in PR #73 credentials
option is added for obtaining authorization token and region, or subscription key and region, in a single object or function call, by @compulim in PR #80- Speech recognition: Polyfill will have
abort
/stop
function set toundefined
if the underlying recognizer from Cognitive Services SDK does not support stop/abort, in PR #81
- 💥 Unifying options to pass credentials
authorizationToken
,region
, andsubscriptionKey
are being deprecated in favor ofcredentials
options.credentials
can be one of the following types:{ authorizationToken: string, region: string? }
{ region: string?, subscriptionKey: string }
Promise<{ authorizationToken: string, region: string? }>
Promise<{ region: string?, subscriptionKey: string }>
() => { authorizationToken: string, region: string? }
() => { region: string?, subscriptionKey: string }
() => Promise<{ authorizationToken: string, region: string? }>
() => Promise<{ region: string?, subscriptionKey: string }>
- If
credentials
is a function, it will be called just before the credentials is needed and may be called very frequently. This behavior matches the deprecatingauthorizationToken
. The result of the call is also expected to be cached. - If
region
is not returned, the default value of"westus"
will be used.
- Bumped dependencies, in PR #73
- 🔥
authorizationToken
,region
, andsubscriptionKey
are being deprecated in favor ofcredentials
options, by @compulim in PR #80
- Speech recognition: Removed extraneous finalized
result
event in continuous mode, by @compulim, in PR #79
5.0.1 - 2019-10-25
- Fixed dependences in PR #76
bundle
packagedependencies
: Movedeslint
to development dependencies
component
packagepeerDependencies
: No longer requiresreact
dependencies
- Moved
eslint
to development dependencies - Removed
event-target-shim
because incompatibility with ES5
- Moved
devDependencies
: Removedreact
- Removed
import '@babel/runtime'
explicitly
5.0.0 - 2019-10-23
- Speech recognition: Fix #23 and #24, support
audiostart
/audioend
/soundstart
/soundend
event, in PR #33 - Speech recognition: Fix #25 and #26, support true
abort
andstop
function, in PR #33 - Speech recognition: Fix #29, support continuous mode, in PR #33
- Quirks: in continuous mode, calling
stop
in-betweenrecognizing
andrecognized
will not emit finalresult
event
- Quirks: in continuous mode, calling
- Speech recognition: New
audioConfig
option to override the defaultAudioConfig.fromDefaultMicrophoneInput
, in PR #33 - Speech synthesis: Fix #32, fetch voices from services, in PR #35
- Speech synthesis: Fix #34, in PR #36 and PR #44
- Support user-controlled
AudioContext
object to be passed as an option namedaudioContext
- If no
audioContext
option is passed, will create a newAudioContext
object on first synthesis
- Support user-controlled
- Speech synthesis: If an empty utterance is being synthesized, will play an local empty audio clip, in PR #36
- Speech recognition: Fix #30, support dynamic phrases, in PR #37
- Pass it as an array to
SpeechRecognition.grammars.phrases
- Pass it as an array to
- Speech recognition: Fix #31, support reference grammars, in PR #37
- When creating the ponyfill, pass it as an array to
referenceGrammars
options
- When creating the ponyfill, pass it as an array to
- Speech recognition: Fix #27, support custom speech, in PR #41
- Use option
speechRecognitionEndpointId
- Use option
- Speech synthesis: Fix #28 and #62, support custom voice font, in PR #41 and PR #67
- Use option
speechSynthesisDeploymentId
- Voice list is only fetch when using subscription key
- Use option
- Speech synthesis: Fix #48, support output format through
outputFormat
option, in PR #49 *
: Fix #47, addenableTelemetry
option for disabling collecting telemetry data in Speech SDK, in PR #51 and PR #66*
: Fix #53, added ESLint, in PR #54- Speech synthesis: Fix #39, support SSML utterance, in PR #57
- Speech recognition: Fix #59, support
stop()
function by finalizing partial speech, in PR #60 - Fix #67, add warning when using subscription key instead of authorization token, in PR #69
- Fix #70, fetch authorization token before every synthesis, in PR #71
- 💥 Instead of stopping
AudioContext
after all pending utterances are finished, theAudioContext
is now persisted. If this is not desirable in your application and would like to control the lifetime ofAudioContext
object, please create your own instance and pass it as an option namedaudioContext
when creating the ponyfill - 💥
createSpeechServicesPonyfill
function is no longer asynchronous- Immediate after the ponyfill is created, we will fetch voice list from the services and emit
voiceschanged
event on completion
- Immediate after the ponyfill is created, we will fetch voice list from the services and emit
- Bumped dependencies, in PR #20
- @babel/cli@^7.5.5
- @babel/core@^7.5.5
- @babel/plugin-proposal-object-rest-spread@^7.5.5
- @babel/plugin-transform-runtime@^7.5.5
- @babel/preset-env@^7.5.5
- @babel/runtime@^7.5.5
- babel-jest@^24.8.0
- babel-plugin-transform-inline-environment-variables@^0.4.3
- jest@^24.8.0
- memoize-one@^5.0.5
- rimraf@^2.6.3
- simple-update-in@^2.1.0
- Added version number as
<meta>
tag, in PR #20 - Added bundle distribution thru https://unpkg.com/web-speech-cognitive-services@latest/umd/, in PR #21
- Bumped to [email protected], in PR #22
- Fix #55 and #63. Moves to WHATWG
EventTarget
interface, in PR #56 and PR #64 - Instead of including
[email protected]
, we are adopting its source code, in PR #72- This is because the original package requires browser to support rest/spread operators
- Fix #45. Speech synthesize should emit "start" and "error" if the synthesized audio clip cannot be fetch over the network, in PR #46
4.0.0 - 2018-12-10
- New playground for better debuggability
- Support of Speech Services SDK, with automated unit tests for speech recognition
- See
SPEC-RECOGNITION.md
andSPEC-SYNTHESIS.md
for quirks
- See
- Speech recognition: Support
stop
on Speech Services - Speech synthesis: Support
pause
andresume
(withpause
andresume
event) - Speech synthesis: Support
speaking
property
- Ponyfill are now constructed based on options (authorization token, region, and subscription key)
- A new set of ponyfill will be created every time an option has changed
- Fix #13 Speech recognition:
SpeechRecognitionResult
should be iterable
3.0.0 - 2018-10-31
- Speech Synthesis: Will async fetch speech token instead of throwing exception
- Use
@babel/runtime
and@babel/plugin-tranform-runtime
, in favor ofbabel-polyfill
- Better error handling on
null
token - Updated voice list from https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/supported-languages
- Reliability around cancelling a playing utterance
- Instead of shutting down the
AudioContext
, we will stop theAudioBufferSourceNode
for a graceful stop
- Instead of shutting down the
- Simplify speech token authorization
recognition.fetchToken = async () => return await 'your subscription key';
recognition.fetchToken = createFetchTokenUsingSubscriptionKey('your subscription key');
fetchToken
will be called every time a token is required, implementor should cache the token as needed
- Bump to
@babel/[email protected]
andjest@^23.6.0
- Bump to
[email protected]
- Publish
/packages/component/
instead of/
- Bump to
[email protected]
2.1.0 - 2018-07-09
- Speech priming via custom
SpeechGrammarList
2.0.0 - 2018-07-09
- SpeechSynthesis polyfill with Cognitive Services
- Removed
CognitiveServices
prefix- Renamed
CognitiveServicesSpeechGrammarList
toSpeechGrammarList
- Renamed
CognitiveServicesSpeechRecognition
toSpeechRecognition
- Removed default export, now must use
import { SpeechRecognition } from 'web-speech-cognitive-services';
- Renamed
- Speech Recognition: changed speech token authorization
recognition.speechToken = new SubscriptionKey('your subscription key');
1.0.0 - 2018-06-29
- Initial release
- SpeechRecognition polyfill with Cognitive Services