Skip to content

Commit 13db5f7

Browse files
committed
feat(Example Streaming Split Samples): Added option to change recognize model
1 parent d1ce560 commit 13db5f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Examples/ServiceExamples/Scripts/ExampleStreamingSplitSamples.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ public class ExampleStreamingSplitSamples : MonoBehaviour
5050
[Tooltip("The IAM url used to authenticate the apikey (optional). This defaults to \"https://iam.bluemix.net/identity/token\".")]
5151
[SerializeField]
5252
private string _iamUrl;
53+
54+
[Header("Parameters")]
55+
// https://www.ibm.com/watson/developercloud/speech-to-text/api/v1/curl.html?curl#get-model
56+
[Tooltip("The Model to use. This defaults to en-US_BroadbandModel")]
57+
[SerializeField]
58+
private string _recognizeModel;
5359
#endregion
5460

5561
private int _recordingRoutine = 0;
@@ -113,6 +119,7 @@ public bool Active
113119
{
114120
if (value && !_service.IsListening)
115121
{
122+
_service.RecognizeModel = (string.IsNullOrEmpty(_recognizeModel) ? "en-US_BroadbandModel" : _recognizeModel);
116123
_service.DetectSilence = true;
117124
_service.EnableWordConfidence = true;
118125
_service.EnableTimestamps = true;

0 commit comments

Comments
 (0)