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

# वाणी बनाएँ

> निर्दिष्ट आवाज़ और फ़ॉर्मैट का उपयोग करके टेक्स्ट से TTS ऑडियो बनाएँ।

## आवाज़ मैपिंग

`voice` को आंतरिक एलियास मैप के ज़रिए प्रदाता के अनुसार सामान्यीकृत किया जाता है:

* `openai`: आम आवाज़ें (उदाहरण के लिए `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `cedar`, `marin`).
* `google` (AI Studio / Gemini TTS): मानक पहले से बनी आवाज़ें:
  `Zephyr`, `Puck`, `Charon`, `Kore`, `Fenrir`, `Leda`, `Orus`, `Aoede`, `Callirrhoe`, `Autonoe`, `Enceladus`, `Iapetus`, `Umbriel`, `Algieba`, `Despina`, `Erinome`, `Algenib`, `Rasalgethi`, `Laomedeia`, `Achernar`, `Alnilam`, `Schedar`, `Gacrux`, `Pulcherrima`, `Achird`, `Zubenelgenubi`, `Vindemiatrix`, `Sadachbia`, `Sadaltager`, `Sulafat`.
* `elevenlabs`: आम सार्वजनिक शुरुआती आवाज़ें मैप की जाती हैं (उदाहरण के लिए `rachel`, `domi`, `bella`, `antoni`, `elli`, `josh`, `arnold`, `adam`, `sam`).

`eleven-labs/eleven-v4` और `eleven-labs/eleven-v4-turbo` के लिए कस्टम क्लोन सहित ElevenLabs वॉइस लाइब्रेरी की कोई भी 20-अक्षर वाली आईडी दें। आवश्यकतानुसार `config.elevenlabs.voice_settings.stability` और `similarity_boost` सेट करें। Eleven v4 में `speed` या `voice_settings.style` समर्थित नहीं हैं।

यदि दिया गया `voice` रूट के प्रदाता/मॉडल संयोजन के लिए मान्य नहीं है, तो अनुरोध `param: "voice"` के साथ `400 invalid_request_error` लौटाता है।

## प्रदाता ओवरराइड

आप अब भी प्रदाता-विशिष्ट आवाज़ सेटिंग दे सकते हैं:

* ElevenLabs: `config.elevenlabs.voice_id` / `config.elevenlabs.voice` / `config.elevenlabs.voiceName`
* Google: `config.google.voice_name` / `config.google.voiceName`

पोर्टेबिलिटी के लिए शीर्ष-स्तरीय `voice` को डिफ़ॉल्ट रखें।

## आवाज़ के नमूने

* OpenAI: [openai.fm](https://www.openai.fm/)
* Google TTS आवाज़ के उदाहरण: [Gemini के टेक्स्ट-टू-स्पीच दस्तावेज़](https://ai.google.dev/gemini-api/docs/speech-generation#voices)
* ElevenLabs आवाज़ लाइब्रेरी: [ElevenLabs Voice Library](https://elevenlabs.io/voice-library)


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml POST /audio/speech
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    OpenAI-संगत एंडपॉइंट के माध्यम से विभिन्न AI मॉडल तक पहुँचने के लिए एक गेटवे
    API।
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: वैश्विक रूटिंग
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /audio/speech:
    post:
      tags:
        - Gateway
      summary: वाणी उत्पन्न करें
      description: दिए गए पाठ से ऑडियो बनाता है।
      operationId: createSpeech
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AudioSpeechRequest'
      responses:
        '200':
          description: ऑडियो फ़ाइल
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
components:
  schemas:
    AudioSpeechRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
        input:
          type: string
        voice:
          type: string
        speed:
          type: number
          minimum: 0.25
          maximum: 4
        format:
          type: string
          enum:
            - mp3
            - wav
            - ogg
            - aac
        provider:
          $ref: '#/components/schemas/ProviderRoutingOptions'
        config:
          type: object
          additionalProperties: true
          properties:
            elevenlabs:
              type: object
              additionalProperties: true
              properties:
                voice_id:
                  type: string
                language_code:
                  type: string
                output_format:
                  type: string
                voice_settings:
                  type: object
                  additionalProperties: true
                  properties:
                    stability:
                      type: number
                    similarity_boost:
                      type: number
    ProviderRoutingOptions:
      type: object
      description: गेटवे चयन के लिए प्रदाता रूटिंग प्राथमिकताएँ।
      properties:
        order:
          type: array
          items:
            type: string
        only:
          type: array
          items:
            type: string
        ignore:
          type: array
          items:
            type: string
        include_alpha:
          type: boolean
          description: रूटिंग में alpha प्रदाताओं को शामिल करें (डिफ़ॉल्ट रूप से बंद)।
        allow_fallbacks:
          type: boolean
          nullable: true
          description: विफलता के बाद किसी अन्य योग्य प्रदाता पर fallback की अनुमति दें।
        require_parameters:
          type: boolean
          nullable: true
          description: >-
            रूटिंग से पहले अनुरोधित पैरामीटरों के लिए प्रदाता का समर्थन आवश्यक
            करें।
        required_execution_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित execution region वाले प्रदाताओं तक सीमित करें।
        required_data_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित data region वाले प्रदाताओं तक सीमित करें।
        require_zero_data_retention:
          type: boolean
          nullable: true
          description: >-
            रूटिंग को उन प्रदाताओं तक सीमित करें जो शून्य डेटा प्रतिधारण का
            समर्थन करते हैं।
        data_collection:
          type: string
          nullable: true
          enum:
            - allow
            - deny
        zdr:
          type: boolean
          nullable: true
        enforce_distillable_text:
          type: boolean
          nullable: true
        quantizations:
          type: array
          nullable: true
          items:
            type: string
        sort:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            इस अनुरोध के लिए प्रदाताओं को क्रम दें, जैसे कीमत, विलंबता या
            थ्रूपुट के आधार पर।
        max_price:
          type: object
          properties:
            prompt:
              oneOf:
                - type: number
                - type: string
            completion:
              oneOf:
                - type: number
                - type: string
            image:
              oneOf:
                - type: number
                - type: string
            audio:
              oneOf:
                - type: number
                - type: string
            request:
              oneOf:
                - type: number
                - type: string
        preferred_min_throughput:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
        preferred_max_latency:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.