Skip to content

Commit

Permalink
Default telemetry to true to honor Speech SDK (#66)
Browse files Browse the repository at this point in the history
* Default telemetry to true to honor Speech SDK

* Update comment

* Update PR number
  • Loading branch information
compulim committed Aug 22, 2019
1 parent 54dc22a commit 533d45d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Speech synthesis: Fix [#28](https://github.com/compulim/web-speech-cognitive-services/issues/28), support custom voice font, in PR [#41](https://github.com/compulim/web-speech-cognitive-services/pull/41)
- Use option `speechSynthesisDeploymentId`
- Speech synthesis: Fix [#48](https://github.com/compulim/web-speech-cognitive-services/issues/48), support output format through `outputFormat` option, in PR [#49](https://github.com/compulim/web-speech-cognitive-services/pull/49)
- `*`: Fix [#47](https://github.com/compulim/web-speech-cognitive-services/issues/47), add `enableTelemetry` option for disabling collecting telemetry data in Speech SDK, in PR [#51](https://github.com/compulim/web-speech-cognitive-services/pull/51)
- `*`: Fix [#47](https://github.com/compulim/web-speech-cognitive-services/issues/47), add `enableTelemetry` option for disabling collecting telemetry data in Speech SDK, in PR [#51](https://github.com/compulim/web-speech-cognitive-services/pull/51) and PR [#66](https://github.com/compulim/web-speech/cognitive-services/pull/66)
- `*`: Fix [#53](https://github.com/compulim/web-speech-cognitive-services/issues/53), added ESLint, in PR [#54](https://github.com/compulim/web-speech-cognitive-services/pull/54)
- Speech synthesis: Fix [#39](https://github.com/compulim/web-speech-cognitive-services/issues/39), support SSML utterance, in PR [#57](https://github.com/compulim/web-speech-cognitive-services/pull/57)
- Speech recognition: Fix [#59](https://github.com/compulim/web-speech-cognitive-services/issues/59), support `stop()` function by finalizing partial speech, in PR [#60](https://github.com/compulim/web-speech-cognitive-services/pull/60)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ class SpeechRecognitionEvent {
export default ({
audioConfig = AudioConfig.fromDefaultMicrophoneInput(),
authorizationToken,
enableTelemetry,

// We set telemetry to true to honor the default telemetry settings of Speech SDK
// https://github.com/Microsoft/cognitive-services-speech-sdk-js#data--telemetry
enableTelemetry = true,

referenceGrammars,
region = 'westus',
speechRecognitionEndpointId,
Expand Down Expand Up @@ -140,7 +144,8 @@ export default ({
})
);

SpeechRecognizer.enableTelemetry(enableTelemetry);
// If enableTelemetry is set to null or non-boolean, we will default to true.
SpeechRecognizer.enableTelemetry(enableTelemetry !== false);

class SpeechRecognition extends EventTarget {
constructor() {
Expand Down

0 comments on commit 533d45d

Please sign in to comment.