{
  "openapi": "3.0.1",
  "info": {
    "title": "Voice Detail",
    "version": "1.0.0",
    "description": "API to retrieve detailed information about a specific voice."
  },
  "servers": [
    {
      "url": "https://converter.fineshare.net",
      "description": "Voices"
    }
  ],
  "paths": {
    "/api/getvoicedetail": {
      "get": {
        "summary": "Retrieve voice details",
        "operationId": "GetVoiceDetail",
        "tags": ["Voice Management"],
        "parameters": [
          {
            "name": "voice",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The voice parameter specifies the voice name. It should be provided in lowercase, with spaces replaced by hyphens (e.g., henry-young).",
            "example": "henry-young"
          }
        ],
        "responses": {
          "200": {
            "description": "Detailed information about the voice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetVoiceDetailRespModel"
                },
                "examples": {
                  "example-1": {
                    "summary": "Successful Response",
                    "value": {
                      "status": "success",
                      "voiceId": "voice123",
                      "name": "VoiceOne",
                      "gender": "female",
                      "language": "en-US",
                      "category": "standard",
                      "description": "A standard female voice in US English.",
                      "additionalDetails": {
                        "pitch": "neutral",
                        "speed": "normal",
                        "supportedFormats": ["mp3", "wav"]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - invalid or missing 'voice' parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            }
          },
          "404": {
            "description": "Voice not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            }
          },
          "500": {
            "description": "Server error - unable to process the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GetVoiceDetailRespModel": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "success"
          },
          "voiceId": {
            "type": "string",
            "example": "voice123"
          },
          "name": {
            "type": "string",
            "example": "VoiceOne"
          },
          "gender": {
            "type": "string",
            "enum": ["male", "female"],
            "example": "female"
          },
          "language": {
            "type": "string",
            "example": "en-US"
          },
          "category": {
            "type": "string",
            "example": "standard"
          },
          "description": {
            "type": "string",
            "example": "A standard female voice in US English."
          },
          "additionalDetails": {
            "type": "object",
            "properties": {
              "pitch": {
                "type": "string",
                "example": "neutral"
              },
              "speed": {
                "type": "string",
                "example": "normal"
              },
              "supportedFormats": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "mp3"
                }
              }
            }
          }
        }
      },
      "ErrorModel": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Invalid voice identifier."
          },
          "details": {
            "type": "string",
            "example": "The provided voice ID does not exist."
          }
        }
      }
    }
  }
}

