File tree Expand file tree Collapse file tree
Source/SpeechToTextV1/WebSockets
Tests/SpeechToTextV1Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import IBMSwiftSDKCore
3434public class SpeechToTextSession {
3535
3636 /// The URL that shall be used to stream audio for transcription.
37- public var websocketsURL = " https ://api.us-south.speech-to-text.watson.cloud.ibm.com/v1/recognize" {
37+ public var websocketsURL = " wss ://api.us-south.speech-to-text.watson.cloud.ibm.com/v1/recognize" {
3838 didSet {
3939 // serviceURL and tokenURL are both derivative of websocketsURL
4040 if websocketsURL. last == " / " {
Original file line number Diff line number Diff line change @@ -44,11 +44,11 @@ class SpeechToTextUnitTests: XCTestCase {
4444
4545 // Trailing forward slash
4646 speechToTextSession. websocketsURL = " wss://api.us-south.speech-to-text.watson.cloud.ibm.com/v1/recognize/ "
47- XCTAssertEqual ( speechToTextSession. serviceURL, " api.us-south.speech-to-text.watson.cloud.ibm.com " )
47+ XCTAssertEqual ( speechToTextSession. serviceURL, " https:// api.us-south.speech-to-text.watson.cloud.ibm.com" )
4848
4949 // http instead of https
5050 speechToTextSession. websocketsURL = " ws://api.us-south.speech-to-text.watson.cloud.ibm.com/v1/recognize "
51- XCTAssertEqual ( speechToTextSession. serviceURL, " api.us-south.speech-to-text.watson.cloud.ibm.com " )
51+ XCTAssertEqual ( speechToTextSession. serviceURL, " http:// api.us-south.speech-to-text.watson.cloud.ibm.com" )
5252
5353 // Different base URL
5454 speechToTextSession. websocketsURL = " wss://example.com/speech-to-text/api/v1/recognize/v1/recognize "
You can’t perform that action at this time.
0 commit comments