{"id":3163,"library":"mypy-boto3-voice-id","title":"Type Annotations for boto3 Voice ID","description":"mypy-boto3-voice-id provides static type annotations for the AWS Voice ID service within the `boto3` library. It enhances developer experience with tools like MyPy, Pyright, and IDEs, offering features like autocompletion and static type checking for `boto3.client('voice-id')` calls. This package, currently at version 1.42.3, is automatically generated by the `youtype/mypy_boto3_builder` project, ensuring type definitions are kept up-to-date with the corresponding `boto3` releases.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","type-hints","mypy","voice-id"],"install":[{"cmd":"pip install mypy-boto3-voice-id","lang":"bash","label":"Install standalone package"},{"cmd":"pip install 'boto3-stubs[voice-id]'","lang":"bash","label":"Install as part of boto3-stubs meta-package"}],"dependencies":[{"reason":"This package provides type hints for boto3, so boto3 is required at runtime for the actual AWS API calls.","package":"boto3","optional":true}],"imports":[{"symbol":"VoiceIDClient","correct":"from mypy_boto3_voice_id.client import VoiceIDClient"},{"note":"Paginator classes are specific to the service and methods (e.g., ListDomainsPaginator). VoiceIDPaginator is a base type.","symbol":"VoiceIDPaginator","correct":"from mypy_boto3_voice_id.paginators import VoiceIDPaginator"},{"symbol":"CreateDomainRequestTypeDef","correct":"from mypy_boto3_voice_id.type_defs import CreateDomainRequestTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\n# Recommended: Use TYPE_CHECKING to avoid runtime dependency on mypy-boto3-voice-id\nif TYPE_CHECKING:\n    from mypy_boto3_voice_id.client import VoiceIDClient\n    from mypy_boto3_voice_id.type_defs import ListDomainsResponseTypeDef\n\ndef list_voice_id_domains():\n    # Type-hint the boto3 client for static analysis\n    client: VoiceIDClient = boto3.client(\"voice-id\")\n    \n    # The response will also be type-checked\n    response: ListDomainsResponseTypeDef = client.list_domains()\n    \n    print(\"Voice ID Domains:\")\n    for domain in response.get(\"DomainSummaries\", []):\n        print(f\"  ID: {domain['DomainId']}, Name: {domain['Name']}\")\n\nif __name__ == \"__main__\":\n    # Ensure AWS credentials are configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)\n    # or AWS CLI config for this to run successfully.\n    list_voice_id_domains()","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-voice-id` for type-hinting a `boto3` Voice ID client and its responses. It utilizes a `TYPE_CHECKING` guard to ensure the type stubs are only used during static analysis, preventing a runtime dependency in production environments."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. Consider pinning to an older `mypy-boto3-voice-id` version if Python 3.8 is strictly required (though this is not recommended).","message":"The underlying `mypy_boto3_builder` project (which generates this package) removed support for Python 3.8 in version 8.12.0. `mypy-boto3-voice-id` versions generated with `builder` 8.12.0 or newer require Python 3.9 or higher.","severity":"breaking","affected_versions":">=1.42.3 (generated with builder 8.12.0)"},{"fix":"Review and update explicit `TypeDef` annotations in your code to match the new, shorter names. Consult the specific service documentation for the exact `TypeDef` names.","message":"In `mypy_boto3_builder` version 8.9.0, the naming convention for TypeDefs used for packed method arguments was shortened. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. This affects explicit type hints in your code.","severity":"breaking","affected_versions":">=1.42.0 (generated with builder 8.9.0)"},{"fix":"To resolve Pylint issues, set the type-hinted variables to `object` in the `else` branch of the `TYPE_CHECKING` block. Example: `if TYPE_CHECKING: from mypy_boto3_ec2.client import EC2Client else: EC2Client = object`.","message":"When using `TYPE_CHECKING` guards to conditionally import type stubs (a common pattern for production deployments), Pylint may report `undefined-variable` errors for the type-hinted objects.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If experiencing performance issues in PyCharm, consider installing the 'lite' version of `boto3-stubs` (e.g., `pip install boto3-stubs-lite[voice-id]`) which provides a more lightweight set of type annotations, albeit with some reduced granularity.","message":"PyCharm has known performance issues when dealing with Python's `Literal` overloads, which are extensively used in `mypy-boto3` type stubs. This can lead to slower IDE performance.","severity":"gotcha","affected_versions":"All versions (PyCharm specific)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}