SR Websocket
  • 19 Jul 2024
  • 2 Minutes to read
  • Contributors
  • PDF

SR Websocket

  • PDF

Article summary

Performs speech recognition. Uses SestekSR with web socket protocol.

Parameters:

name
description
default
AddressAddress of SestekSR that will be used for performing recognitionshttp://core-sr
IgnoreSslErrorsignore any certificate errors if SestekSR address contains httpsfalse
ConnectionTimeoutMsecSestekSR Connection timeout in terms of milliseconds5000
CredentialIdId of the credential that will be used for SestekSR recognitions. This parameter is only necessary if a cloud SestekSR deployment is used. You shall leave this empty for on-premise deployments, it will be ignored anywayNone(On-Prem)
LanguageLanguage will be used in order to determine which of the provided models will be used for recognition.
ModelsA list of models with different languages that can be used in the recognitions.

Inputs

Audio:
Accepts audio from a single channel. Passing the audio through a VAD node before streaming to this node is recommended.

Events:

name
descriptionknown nodes that generate this event
Language ChangeChanges the language parameter. The recognitions requested after this event will use the updated language (hence appropriate model)Language Identifier, Text Language Identifier

Outputs

Audio:
none

Events:

default
description
SR MilestoneRaised for each piece of speech in the provided audio data. This event contains recognition results for a single piece of speech. "sr-milestone" results are cumulative. The total recognition result in the end can be prepared by concatenating all the sr-milestone events' texts
SR PartialShall be raised several times for the current piece of speech that is being recognized at the moment. An "sr-partial" event replaces any previous "sr-partial" event that has been raised for the same piece of speech. "sr-partial" event resets after a "sr-milestone" event has been raised. The total recognition text at a specific point in time can be prepared by concatenating all the previous "sr-milestone" events' texts and adding the latest "sr-partial" event's text at the end.

License : Needs "sr-websocket" option

Remarks :

*Not all models can generate partial recognition results. At the moment this document is being prepared end-to-end models still lack this ability.

Service Link Parametrization:
The default address for this node is http://core-sr . This default link is intended for on-premise installations.
When SestekSr is deployed in the cloud SestekSR uses a http address that depends on the name of the model it hosts. eg.

http://core-sr-turkish
http://core-sr-english
http://core-sr-arabic

In order to use a single link in the cloud that you won't need to change every time you switch your models you should prefer the link with the {model_title} placeholder. ie. your default link should be the following: http://core-sr-{model_title}

Project Structure

A simple project utilizing SR WebSocket can be built as such:

image.png

Events

Note that SR WebSocket only processes Language Change events. So no other event input from any node other than Language Identifier or Text Language Identifier is needed.

Another simple project that can react to language changes can be built as such:

image.png

Compatibility

SR Websocket outputs SR Milestone and SR Partial events. Which means every node that is compatible with SR Http is also compatible with SR Websocket. You can check the SR Http page to learn more about compatible nodes.

Supported flow types: Stream


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.