Comments (8)
The data type for the endpoint isn't of the expected type.
fromEndPoint is defined as:
public static fromEndpoint(endpoint: URL, subscriptionKey: string): SpeechConfig
So in this case, you'd want something like: (node)
var URL = require('url').URL;
let speechConfig = sdk.SpeechConfig.fromEndpoint(new URL (wss://${SERVICE_REGION}.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1
), SUBSCRIPTION_KEY);
The SDK's parameter check at that point was only for null on the passed in parameter, it didn't type check the parameter or the .href property it used. I'll put a bug in our backlog to tighten the parameter check and get a better error message out.
Hope that helps.
from cognitive-services-speech-sdk-js.
ping?
from cognitive-services-speech-sdk-js.
currently not possible by setting a property. We are going to try to address this in an upcoming release.
as a work-around you can create the recognizer fromEndpoint
https://docs.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig?view=azure-node-latest#fromendpoint-url--string-
the URL should look similar to this:
wss://.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1
from cognitive-services-speech-sdk-js.
Thank you. I'll try it.
from cognitive-services-speech-sdk-js.
Hello!
I am trying to use dictation mode as well and this is how I setup the speechConfig using the workaround. It worked using fromSubscription
, but doesn't work using fromEndpoint
. I am kind of guessing on how the url should be formatted as I have not found a reference to a websocket url in the azure portal.
If you could see what I am doing wrong, help would be much appreciated
// now create the audio-config pointing to our stream and
// the speech config specifying the language.
let audioConfig = sdk.AudioConfig.fromStreamInput(pushStream);
// let speechConfig = sdk.SpeechConfig.fromSubscription(SUBSCRIPTION_KEY, SERVICE_REGION);
let speechConfig = sdk.SpeechConfig.fromEndpoint(`wss://${SERVICE_REGION}.stt.speech.microsoft.com/speech/recognition/dictation/cognitiveservices/v1`, SUBSCRIPTION_KEY);
// setting the recognition language to English.
speechConfig.speechRecognitionLanguage = LANG;
// create the speech recognizer.
let recognizer = new sdk.SpeechRecognizer(speechConfig, audioConfig);
from cognitive-services-speech-sdk-js.
I've noticed that fromEndpoint uses subscription key. Is there an alternative that accepts token (and still enabled dictation mode)? I want to avoid issueToken for each client.
from cognitive-services-speech-sdk-js.
You should be able to pass in any value you want for the subscription key passed to fromEnedPoint and then call recognizer.authorizationToken = and the token will be used instead of the subscription key.
from cognitive-services-speech-sdk-js.
enableDictation was added to the SpeechConfig object in the 1.7.0 release.
from cognitive-services-speech-sdk-js.
Related Issues (20)
- [Bug]: Receive InvalidOperation: Payload must be ArrayBuffer HOT 7
- [Bug]: ReferenceError: SessionEventArgs is not defined HOT 8
- [Bug]: 1.33.1 breaks existing "require" usage
- [Bug]: Azure TTS service not working with JS SDK with NextJS and C# SDK with Unity HOT 7
- [Bug]: Not working with esbuild (e.g. NG17) HOT 5
- [Bug]: synthesizer.speakTextAsync not working properly with Firefox or on iOS (Safari) with continuous text input HOT 4
- [Help Wanted] Issues Proxying Browser Transcription Stream to Microsoft Transcription Service Title HOT 6
- [Bug]: Speech Recognition result cannot always be converted to Pronunciation Assessment Result HOT 1
- [Bug]: SpeakSsmlAsync call fails with canceled when sending the same text to be synthesized.
- [Bug]: Cannot access 'ConnectionFactoryBase' before initialization HOT 1
- How can I hide my key from user when using microsoft-cognitiveservices-speech-sdk with react HOT 1
- [Bug]: Protocols.Core.BadClientRequestException: Avatar is currently only available on Standard S0 resource websocket error code: 1011
- [Bug]: Issue with WebSocket Connection in JavaScript SDK Using Token from Python Service Principal HOT 10
- [Bug]: WebSocketConnection failed after updating authorizationToken in SpeechRecognizer HOT 2
- Text to speech Avatar resizing video HOT 1
- [Feature request]: more information on voices, children and multilinguals voices HOT 3
- [Question] Using not default speaker for TTS HOT 14
- IntentRecognizer - Supporting CLU and simple pattern matching HOT 1
- [Bug]: result.text property set to '.' on recognized event when performing speech translation with Arabic languages. HOT 8
- [Bug]: SpeechConfig.FromEndpoint always cancel the connection with Invalid argument exception HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cognitive-services-speech-sdk-js.