> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Download voice design audio sample

> Downloads the WAV audio sample for the voice design. Returns the latest version's sample by default, or a specific version when `?version=N` is provided. The `id` parameter accepts either a UUID or the design name.



## OpenAPI

````yaml /openapi/voice-designs.yml get /voice_designs/{id}/sample
openapi: 3.1.0
info:
  title: Voice Designs API
  version: 2.0.0
  description: Create and manage AI-generated voice designs using natural language prompts.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
tags:
  - name: Voice Designs
    description: >-
      Create and manage AI-generated voice designs using natural language
      prompts.
paths:
  /voice_designs/{id}/sample:
    get:
      tags:
        - Voice Designs
      summary: Download voice design audio sample
      description: >-
        Downloads the WAV audio sample for the voice design. Returns the latest
        version's sample by default, or a specific version when `?version=N` is
        provided. The `id` parameter accepts either a UUID or the design name.
      operationId: getVoiceDesignSample
      parameters:
        - name: id
          in: path
          required: true
          description: The voice design UUID or name.
          schema:
            type: string
        - name: version
          in: query
          required: false
          description: >-
            Specific version number to download the sample for. Defaults to the
            latest version.
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: WAV audio sample binary.
          content:
            audio/wav:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized — missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice-designs_ErrorResponse'
        '404':
          description: Voice design or version not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice-designs_ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.voiceDesigns.downloadSample('id');

            console.log(response);

            const content = await response.blob();
            console.log(content);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.voice_designs.download_sample(
                id="id",
            )
            print(response)
            content = response.read()
            print(content)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.VoiceDesigns.DownloadSample(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\ttelnyx.VoiceDesignDownloadSampleParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import com.telnyx.sdk.core.http.HttpResponse;

            import
            com.telnyx.sdk.models.voicedesigns.VoiceDesignDownloadSampleParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    HttpResponse response = client.voiceDesigns().downloadSample("id");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.voice_designs.download_sample("id")

            puts(response)
        - lang: CLI
          source: |-
            telnyx voice-designs download-sample \
              --api-key 'My API Key' \
              --id id
components:
  schemas:
    voice-designs_ErrorResponse:
      type: object
      description: Standard error response envelope.
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
      example:
        errors:
          - code: '10005'
            title: Resource not found
            detail: Voice design not found
    ErrorObject:
      type: object
      description: A single error object.
      properties:
        code:
          type: string
          description: Telnyx-specific error code.
        title:
          type: string
          description: Short, human-readable summary of the error.
        detail:
          type: string
          description: Detailed, human-readable explanation of the error.
        source:
          type: object
          description: Reference to the source of the error.
          properties:
            pointer:
              type: string
              description: A JSON Pointer (RFC 6901) to the field that caused the error.

````