watson-developer-cloud / speech-javascript-sdk

Library for using the IBM Watson Speech to Text and Text to Speech services in web browsers.
https://watson-speech.mybluemix.net/
260 stars 132 forks source link

Support for character_insertion_bias #210

Closed rivens closed 2 years ago

rivens commented 2 years ago

The parameter character_insertion_bias is not available in the list of allowed parameters that can be passed via websockets to the /v1/recognize endpoint (i.e. openingMessageParamsAllowed variable in speech-to-text/recognize-stream.js). I've made this change in my own copy so if there are some guidelines on how to contribute that here, I'd be happy to do so.

jeffpk62 commented 2 years ago

@rivens There are no current plans to expose that parameter publicly in the SDKs.

Copy: @apaparazzi0329

rivens commented 2 years ago

Hi Jeff, what's the most appropriate approach for passing along parameters that aren't exposed in the SDK? Since the code appears to disallow any parameters that aren't in the allowed list, I assume I'd need to fork the SDK, modify it to allow that parameter, include the fork in my project rather than the official repo and then re-apply that adjustment each time I update to a new version of the SDK?

jeffpk62 commented 2 years ago

Hi, @rivens. Your approach sounds like the best means. I just learned that there are plans to expose that parameter in a future release thus simmer. So unless it's urgent for you, you could hold until is released as a beta feature.

rivens commented 2 years ago

Sounds good, thanks Jeff. I'll go that route for now and keep an eye out for built-in support in a future release. This issue can be closed. Not sure if it's my responsibility to close it?

jeffpk62 commented 2 years ago

Thanks @rivens.

@apaparazzi0329 Can you close this issue, please?

jeffpk62 commented 2 years ago

@rivens The character_insertion_bias parameter just went live as a beta parameter for all speech recognition methods. This is true of the base service at this point, but it's not part of the SDKs yet. For example, it is the last query parameter of the synchronous HTTP recognize method: https://cloud.ibm.com/apidocs/speech-to-text#recognize. I wanted to make you aware of this since we'd just discussed it.