Skip to content

Commit 4965e35

Browse files
committed
fix: correct init
fix: correct init
1 parent a24103d commit 4965e35

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lib/ibm_watson/speech_to_text_v1.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ module IBMWatson
5050
# The Speech to Text V1 service.
5151
class SpeechToTextV1 < IBMCloudSdkCore::BaseService
5252
include Concurrent::Async
53-
DEFAULT_SERVICE_NAME = "speech_to_text"
54-
DEFAULT_SERVICE_URL = "https://stream.watsonplatform.net/speech-to-text/api"
5553
##
5654
# @!method initialize(args)
5755
# Construct a new client for the Speech to Text service.
@@ -60,19 +58,15 @@ class SpeechToTextV1 < IBMCloudSdkCore::BaseService
6058
# @option args service_url [String] The base service URL to use when contacting the service.
6159
# The base service_url may differ between IBM Cloud regions.
6260
# @option args authenticator [Object] The Authenticator instance to be configured for this service.
63-
# @option args service_name [String] The name of the service to configure. Will be used as the key to load
64-
# any external configuration, if applicable.
6561
def initialize(args = {})
6662
@__async_initialized__ = false
6763
defaults = {}
68-
defaults[:service_url] = DEFAULT_SERVICE_URL
69-
defaults[:service_name] = DEFAULT_SERVICE_NAME
64+
defaults[:service_url] = "https://stream.watsonplatform.net/speech-to-text/api"
7065
defaults[:authenticator] = nil
71-
user_service_url = args[:service_url] unless args[:service_url].nil?
7266
args = defaults.merge(args)
67+
args[:service_name] = "speech_to_text"
7368
args[:authenticator] = IBMCloudSdkCore::ConfigBasedAuthenticatorFactory.new.get_authenticator(service_name: args[:service_name]) if args[:authenticator].nil?
7469
super
75-
@service_url = user_service_url unless user_service_url.nil?
7670
end
7771

7872
#########################

0 commit comments

Comments
 (0)