Main Content

setOptions

Set server options

Since R2023a

    Description

    example

    setOptions(clientObj,Name,Value) sets one or more server options for the speechClient object.

    Examples

    collapse all

    Create a speechClient object that interfaces with the Google speech service.

    clientObj = speechClient("Google");

    Set the languageCode server option for speech-to-text transcription.

    setOptions(clientObj,"languageCode","en-US");

    Use getOptions to view the server options in the speechClient object.

    options = getOptions(clientObj)
    options=1×2 cell array
        {'languageCode'}    {["en-US"]}
    
    

    Use clearOptions to remove the server option from the speechClient object.

    clearOptions(clientObj)

    Input Arguments

    collapse all

    Client object, specified as an object returned by speechClient. You can only set server options for client objects that interface with third-party speech services (Google®, IBM®, Microsoft®, or Amazon®).

    Name-Value Arguments

    Specify server options as Name1,Value1,...,NameN,ValueN, where Name is a string containing the server option and Value is the corresponding value.

    For example, setOptions(clientObj,"languageCode","en-US") sets the languageCode server option to "en-US".

    Valid server options and values depend on the specific third-party API. See the documentation for the specific service for option names and values.

    Version History

    Introduced in R2023a