Skip to content

Commit eb7ca9c

Browse files
authored
Merge branch 'development' into feature-add-visual-recognition-examples
2 parents 10eba8d + b2b140e commit eb7ca9c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/IBM.WatsonDeveloperCloud.SpeechToText.v1/SpeechToTextServiceExtension.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@
2121
using IBM.WatsonDeveloperCloud.Service;
2222
using IBM.WatsonDeveloperCloud.SpeechToText.v1.Model;
2323
using Newtonsoft.Json;
24-
using Newtonsoft.Json.Linq;
2524
using System;
2625
using System.Collections.Generic;
2726
using System.IO;
28-
using System.Linq;
2927
using System.Net.Http;
3028
using System.Net.Http.Headers;
3129

@@ -94,6 +92,7 @@ public SpeechRecognitionResults Recognize(string contentType, Stream audio, stri
9492
/// <param name="metaData"></param>
9593
/// <param name="audio"></param>
9694
/// <returns></returns>
95+
[Obsolete("Recognize using metadata is deprecated. Please set options using recognize parameters.")]
9796
public SpeechRecognitionResults Recognize(string contentType, Metadata metaData, Stream audio, string transferEncoding = "", string model = "en-US_BroadbandModel", string customizationId = "")
9897
{
9998
if (metaData == null)
@@ -135,6 +134,7 @@ public SpeechRecognitionResults Recognize(string contentType, Metadata metaData,
135134
/// <param name="smartFormatting"></param>
136135
/// <param name="speakerLabels"></param>
137136
/// <returns></returns>
137+
[Obsolete("RecognizeWithSession is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
138138
public SpeechRecognitionResults RecognizeWithSession(string sessionId, string contentType, Stream audio, string transferEncoding = "", string model = "en-US_BroadbandModel", string customizationId = "", bool? continuous = null, int? inactivityTimeout = null, string[] keywords = null, double? keywordsThreshold = null, int? maxAlternatives = null, double? wordAlternativesThreshold = null, bool? wordConfidence = null, bool? timestamps = null, bool profanityFilter = false, bool? smartFormatting = null, bool? speakerLabels = null)
139139
{
140140
if (string.IsNullOrEmpty(sessionId))
@@ -177,6 +177,7 @@ public SpeechRecognitionResults RecognizeWithSession(string sessionId, string co
177177
/// <param name="metaData"></param>
178178
/// <param name="audio"></param>
179179
/// <returns></returns>
180+
[Obsolete("RecognizeWithSession is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
180181
public SpeechRecognitionResults RecognizeWithSession(string sessionId, string contentType, Metadata metaData, Stream audio, string transferEncoding = "", string model = "en-US_BroadbandModel", string customizationId = "")
181182
{
182183
if (string.IsNullOrEmpty(sessionId))
@@ -347,6 +348,7 @@ private SpeechRecognitionResults Recognize(string sessionId, string contentType,
347348
/// <param name="sequenceId">The sequence ID of the recognition task whose results you want to observe. Omit the parameter to obtain results either for an ongoing recognition, if any, or for the next recognition task regardless of whether it specifies a sequence ID.</param>
348349
/// <param name="interimResults">Indicates whether the service is to return interim results. If true, interim results are returned as a stream of JSON objects; each object represents a single SpeechRecognitionEvent. If false, the response is a single SpeechRecognitionEvent with final results only.</param>
349350
/// <returns></returns>
351+
[Obsolete("ObserveResult is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
350352
public List<SpeechRecognitionResults> ObserveResult(string sessionId, int? sequenceId = (int?)null, bool interimResults = false)
351353
{
352354
List<SpeechRecognitionResults> result = null;
@@ -410,6 +412,7 @@ public List<SpeechRecognitionResults> ObserveResult(string sessionId, int? seque
410412
/// <param name="acousticCustomizationId">The GUID of a custom acoustic model that is to be used with the new session. The base model of the specified custom acoustic model must match the model specified with the model parameter. You must make the request with service credentials created for the instance of the service that owns the custom model. By default, no custom acoustic model is used.</param>
411413
/// <param name="baseModelVersion">The version of the specified base model that is to be used with the new session. Multiple versions of a base model can exist when a model is updated for internal improvements. The parameter is intended primarily for use with custom models that have been upgraded for a new base model. The default value depends on whether the parameter is used with or without a custom model. For more information, see Base model version (https://console.bluemix.net/docs/services/speech-to-text/input.html#version).</param>
412414
/// <returns>The created session</returns>
415+
[Obsolete("CreateSession is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
413416
public SpeechSession CreateSession(string model, string customizationId = null, string acousticCustomizationId = null, string baseModelVersion = null)
414417
{
415418
SpeechSession result = null;
@@ -454,6 +457,7 @@ public SpeechSession CreateSession(string model, string customizationId = null,
454457
/// </summary>
455458
/// <param name="session">The session to get.</param>
456459
/// <returns></returns>
460+
[Obsolete("GetSessionStatus is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
457461
public SessionStatus GetSessionStatus(SpeechSession session)
458462
{
459463
return this.GetSessionStatus(session.SessionId);
@@ -464,6 +468,7 @@ public SessionStatus GetSessionStatus(SpeechSession session)
464468
/// </summary>
465469
/// <param name="sessionId">The ID of the session for the recognition task.</param>
466470
/// <returns>The session status.</returns>
471+
[Obsolete("GetSessionStatus is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
467472
public SessionStatus GetSessionStatus(string sessionId)
468473
{
469474
SessionStatus result = null;
@@ -504,6 +509,7 @@ public SessionStatus GetSessionStatus(string sessionId)
504509
/// </summary>
505510
/// <param name="session">The session to be deleted.</param>
506511
/// <returns></returns>
512+
[Obsolete("DeleteSession is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
507513
public object DeleteSession(SpeechSession session)
508514
{
509515
return this.DeleteSession(session.SessionId);
@@ -514,6 +520,7 @@ public object DeleteSession(SpeechSession session)
514520
/// </summary>
515521
/// <param name="session">The ID of the session to be deleted.</param>
516522
/// <returns></returns>
523+
[Obsolete("DeleteSession is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
517524
public object DeleteSession(string sessionId)
518525
{
519526
if (string.IsNullOrEmpty(sessionId))
@@ -602,6 +609,7 @@ SpeechRecognitionResults ISpeechToTextService.Recognize(string sessionId, string
602609
}
603610
}
604611

612+
[Obsolete("Metadata is obsolete. Please use method parameters to set options.")]
605613
public class Metadata
606614
{
607615
/// <summary>
@@ -689,6 +697,7 @@ public class Metadata
689697
public bool? SpeakerLabels { get; set; }
690698
}
691699

700+
[Obsolete("SpeechSession is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
692701
public class SpeechSession
693702
{
694703
/// <summary>
@@ -734,6 +743,7 @@ public class SpeechSession
734743
public string Model { get; set; }
735744
}
736745

746+
[Obsolete("SessionStatus is deprecated as of August 8, 2018, and will be removed from service on September 7, 2018.")]
737747
public class SessionStatus
738748
{
739749
/// <summary>

0 commit comments

Comments
 (0)