Assets/SpeechToText/Scripts/SpeechToTextServices/WatsonSpeechToTextComponent.cs
/// <summary>
/// Configures Watson API user credentials.
/// </summary>
/// <param name="apiUsername">Watson API username</param>
/// <param name="apiPassword">Watson API password</param>
Configures Watson API user credentials.
Configures Watson API user credentials .
public void ConfigureCredentials(string apiUsername, string apiPassword)
        {
            if (Config.Instance.FindCredentials(Utilities.Constants.WatsonSpeechToTextServiceID) == null)
            {
                var speechToTextCredentialInfo = new Config.CredentialInfo();
                speechToTextCredentialInfo.m_ServiceID = Utilities.Constants.WatsonSpeechToTextServiceID;
                speechToTextCredentialInfo.m_URL = Utilities.Constants.WatsonSpeechToTextBaseURL;
                speechToTextCredentialInfo.m_User = apiUsername;
                speechToTextCredentialInfo.m_Password = apiPassword;
                Config.Instance.Credentials.Add(speechToTextCredentialInfo);
            }
        }
public void ConfigureCredentials ( string apiUsername , string apiPassword ) { if ( Config . Instance . FindCredentials ( Utilities . Constants . WatsonSpeechToTextServiceID ) == null ) { var speechToTextCredentialInfo = new Config . CredentialInfo ( ) ; speechToTextCredentialInfo . m_ServiceID = Utilities . Constants . WatsonSpeechToTextServiceID ; speechToTextCredentialInfo . m_URL = Utilities . Constants . WatsonSpeechToTextBaseURL ; speechToTextCredentialInfo . m_User = apiUsername ; speechToTextCredentialInfo . m_Password = apiPassword ; Config . Instance . Credentials . Add ( speechToTextCredentialInfo ) ; } }
Configures Watson API user credentials.
Configures Watson API user credentials .
apiUsername
string
Watson API username
Watson API username
apiPassword
string
Watson API password
Watson API password