1. Packages
  2. AWS
  3. API Docs
  4. polly
  5. getVoices
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.polly.getVoices

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for managing an AWS Polly Voices.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.polly.getVoices({});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.polly.get_voices()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/polly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := polly.GetVoices(ctx, &polly.GetVoicesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Polly.GetVoices.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.polly.PollyFunctions;
    import com.pulumi.aws.polly.inputs.GetVoicesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = PollyFunctions.getVoices();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:polly:getVoices
          Arguments: {}
    

    With Language Code

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.polly.getVoices({
        languageCode: "en-GB",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.polly.get_voices(language_code="en-GB")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/polly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := polly.GetVoices(ctx, &polly.GetVoicesArgs{
    			LanguageCode: pulumi.StringRef("en-GB"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Polly.GetVoices.Invoke(new()
        {
            LanguageCode = "en-GB",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.polly.PollyFunctions;
    import com.pulumi.aws.polly.inputs.GetVoicesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = PollyFunctions.getVoices(GetVoicesArgs.builder()
                .languageCode("en-GB")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:polly:getVoices
          Arguments:
            languageCode: en-GB
    

    Using getVoices

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVoices(args: GetVoicesArgs, opts?: InvokeOptions): Promise<GetVoicesResult>
    function getVoicesOutput(args: GetVoicesOutputArgs, opts?: InvokeOptions): Output<GetVoicesResult>
    def get_voices(engine: Optional[str] = None,
                   include_additional_language_codes: Optional[bool] = None,
                   language_code: Optional[str] = None,
                   voices: Optional[Sequence[GetVoicesVoice]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetVoicesResult
    def get_voices_output(engine: Optional[pulumi.Input[str]] = None,
                   include_additional_language_codes: Optional[pulumi.Input[bool]] = None,
                   language_code: Optional[pulumi.Input[str]] = None,
                   voices: Optional[pulumi.Input[Sequence[pulumi.Input[GetVoicesVoiceArgs]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetVoicesResult]
    func GetVoices(ctx *Context, args *GetVoicesArgs, opts ...InvokeOption) (*GetVoicesResult, error)
    func GetVoicesOutput(ctx *Context, args *GetVoicesOutputArgs, opts ...InvokeOption) GetVoicesResultOutput

    > Note: This function is named GetVoices in the Go SDK.

    public static class GetVoices 
    {
        public static Task<GetVoicesResult> InvokeAsync(GetVoicesArgs args, InvokeOptions? opts = null)
        public static Output<GetVoicesResult> Invoke(GetVoicesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVoicesResult> getVoices(GetVoicesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:polly/getVoices:getVoices
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Engine string
    Engine used by Amazon Polly when processing input text for speech synthesis. Valid values are standard, neural, and long-form.
    IncludeAdditionalLanguageCodes bool
    Whether to return any bilingual voices that use the specified language as an additional language.
    LanguageCode string
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    Voices List<GetVoicesVoice>
    List of voices with their properties. See voices Attribute Reference below.
    Engine string
    Engine used by Amazon Polly when processing input text for speech synthesis. Valid values are standard, neural, and long-form.
    IncludeAdditionalLanguageCodes bool
    Whether to return any bilingual voices that use the specified language as an additional language.
    LanguageCode string
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    Voices []GetVoicesVoice
    List of voices with their properties. See voices Attribute Reference below.
    engine String
    Engine used by Amazon Polly when processing input text for speech synthesis. Valid values are standard, neural, and long-form.
    includeAdditionalLanguageCodes Boolean
    Whether to return any bilingual voices that use the specified language as an additional language.
    languageCode String
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    voices List<GetVoicesVoice>
    List of voices with their properties. See voices Attribute Reference below.
    engine string
    Engine used by Amazon Polly when processing input text for speech synthesis. Valid values are standard, neural, and long-form.
    includeAdditionalLanguageCodes boolean
    Whether to return any bilingual voices that use the specified language as an additional language.
    languageCode string
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    voices GetVoicesVoice[]
    List of voices with their properties. See voices Attribute Reference below.
    engine str
    Engine used by Amazon Polly when processing input text for speech synthesis. Valid values are standard, neural, and long-form.
    include_additional_language_codes bool
    Whether to return any bilingual voices that use the specified language as an additional language.
    language_code str
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    voices Sequence[GetVoicesVoice]
    List of voices with their properties. See voices Attribute Reference below.
    engine String
    Engine used by Amazon Polly when processing input text for speech synthesis. Valid values are standard, neural, and long-form.
    includeAdditionalLanguageCodes Boolean
    Whether to return any bilingual voices that use the specified language as an additional language.
    languageCode String
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    voices List<Property Map>
    List of voices with their properties. See voices Attribute Reference below.

    getVoices Result

    The following output properties are available:

    Id string
    Amazon Polly assigned voice ID.
    Engine string
    IncludeAdditionalLanguageCodes bool
    LanguageCode string
    Language code of the voice.
    Voices List<GetVoicesVoice>
    List of voices with their properties. See voices Attribute Reference below.
    Id string
    Amazon Polly assigned voice ID.
    Engine string
    IncludeAdditionalLanguageCodes bool
    LanguageCode string
    Language code of the voice.
    Voices []GetVoicesVoice
    List of voices with their properties. See voices Attribute Reference below.
    id String
    Amazon Polly assigned voice ID.
    engine String
    includeAdditionalLanguageCodes Boolean
    languageCode String
    Language code of the voice.
    voices List<GetVoicesVoice>
    List of voices with their properties. See voices Attribute Reference below.
    id string
    Amazon Polly assigned voice ID.
    engine string
    includeAdditionalLanguageCodes boolean
    languageCode string
    Language code of the voice.
    voices GetVoicesVoice[]
    List of voices with their properties. See voices Attribute Reference below.
    id str
    Amazon Polly assigned voice ID.
    engine str
    include_additional_language_codes bool
    language_code str
    Language code of the voice.
    voices Sequence[GetVoicesVoice]
    List of voices with their properties. See voices Attribute Reference below.
    id String
    Amazon Polly assigned voice ID.
    engine String
    includeAdditionalLanguageCodes Boolean
    languageCode String
    Language code of the voice.
    voices List<Property Map>
    List of voices with their properties. See voices Attribute Reference below.

    Supporting Types

    GetVoicesVoice

    AdditionalLanguageCodes List<string>
    Additional codes for languages available for the specified voice in addition to its default language.
    Gender string
    Gender of the voice.
    Id string
    Amazon Polly assigned voice ID.
    LanguageCode string
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    LanguageName string
    Human readable name of the language in English.
    Name string
    Name of the voice.
    SupportedEngines List<string>
    Specifies which engines are supported by a given voice.
    AdditionalLanguageCodes []string
    Additional codes for languages available for the specified voice in addition to its default language.
    Gender string
    Gender of the voice.
    Id string
    Amazon Polly assigned voice ID.
    LanguageCode string
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    LanguageName string
    Human readable name of the language in English.
    Name string
    Name of the voice.
    SupportedEngines []string
    Specifies which engines are supported by a given voice.
    additionalLanguageCodes List<String>
    Additional codes for languages available for the specified voice in addition to its default language.
    gender String
    Gender of the voice.
    id String
    Amazon Polly assigned voice ID.
    languageCode String
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    languageName String
    Human readable name of the language in English.
    name String
    Name of the voice.
    supportedEngines List<String>
    Specifies which engines are supported by a given voice.
    additionalLanguageCodes string[]
    Additional codes for languages available for the specified voice in addition to its default language.
    gender string
    Gender of the voice.
    id string
    Amazon Polly assigned voice ID.
    languageCode string
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    languageName string
    Human readable name of the language in English.
    name string
    Name of the voice.
    supportedEngines string[]
    Specifies which engines are supported by a given voice.
    additional_language_codes Sequence[str]
    Additional codes for languages available for the specified voice in addition to its default language.
    gender str
    Gender of the voice.
    id str
    Amazon Polly assigned voice ID.
    language_code str
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    language_name str
    Human readable name of the language in English.
    name str
    Name of the voice.
    supported_engines Sequence[str]
    Specifies which engines are supported by a given voice.
    additionalLanguageCodes List<String>
    Additional codes for languages available for the specified voice in addition to its default language.
    gender String
    Gender of the voice.
    id String
    Amazon Polly assigned voice ID.
    languageCode String
    Language identification tag for filtering the list of voices returned. If not specified, all available voices are returned.
    languageName String
    Human readable name of the language in English.
    name String
    Name of the voice.
    supportedEngines List<String>
    Specifies which engines are supported by a given voice.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi