lib/ibm_watson/speech_to_text_v1.rb
def get_model(model_id:)
      raise ArgumentError.new("model_id must be provided") if model_id.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("speech_to_text", "V1", "get_model")
      headers.merge!(sdk_headers)

      method_url = "/v1/models/%s" % [ERB::Util.url_encode(model_id)]

      response = request(
        method: "GET",
        url: method_url,
        headers: headers,
        accept_json: true
      )
      response
    end
def get_model(model_id:)
      raise ArgumentError.new("model_id must be provided") if model_id.nil?

      headers = {
      }
      sdk_headers = Common.new.get_sdk_headers("speech_to_text", "V1", "get_model")
      headers.merge!(sdk_headers)

      method_url = "/v1/models/%s" % [ERB::Util.url_encode(model_id)]

      response = request(
        method: "GET",
        url: method_url,
        headers: headers,
        accept_json: true
      )
      response
    end
@!method initialize(args)
 Construct a new client for the Speech to Text service.

 @param args [Hash] The args to initialize with
 @option args url [String] The base url to use when contacting the service (e.g.
   "https://stream.watsonplatform.net/speech-to-text/api").
   The base url may differ between Bluemix regions.
 @option args username [String] The username used to authenticate with the service.
   Username and password credentials are only required to run your
   application locally or outside of Bluemix. When running on
   Bluemix, the credentials will be automatically loaded from the
   `VCAP_SERVICES` environment variable.
 @option args password [String] The password used to authenticate with the service.
   Username and password credentials are only required to run your
   application locally or outside of Bluemix. When running on
   Bluemix, the credentials will be automatically loaded from the
   `VCAP_SERVICES` environment variable.
 @option args iam_apikey [String] An API key that can be used to request IAM tokens. If
   this API key is provided, the SDK will manage the token and handle the
   refreshing.
 @option args iam_access_token [String] An IAM access token is fully managed by the application.
   Responsibility falls on the application to refresh the token, either before
   it expires or reactively upon receiving a 401 from the service as any requests
   made with an expired token will fail.
 @option args iam_url [String] An optional URL for the IAM service API. Defaults to
   'https://iam.ng.bluemix.net/identity/token'.

 Models


 @!method get_model(model_id:)
 Get a model.
 Gets information for a single specified language model that is available for use
   with the service. The information includes the name of the model and its minimum
   sampling rate in Hertz, among other things.

   **See also:** [Languages and
   models](https://cloud.ibm.com/docs/services/speech-to-text/models.html).
 @param model_id [String] The identifier of the model in the form of its name from the output of the **Get a
   model** method.
 @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.