# 概述

简介 Afarensis 音频 API，基于最先进的 large-v2 Whisper 模型，提供了强大的语音转文本功能，包括音频转录和音频翻译。这些功能支持多种应用场景，如将音频内容转录为文本或将非英语音频翻译并转录为英文。Afarensis 致力于提供高效、准确的音频处理服务。

主要功能 音频转录：将任何语言的音频转录为文本。 音频翻译与转录：将音频翻译并转录为英文。 支持的文件类型和大小限制 文件类型：支持 mp3、mp4、mpeg、mpga、am4a、wav、webm 等格式。 文件大小：上传的音频文件大小限制为 25 MB。 快速入门 音频转录示例 from afarensis import AfarensisAPI

client = AfarensisAPI()

## 将音频文件转录为文本

file\_path = "path\_to\_your\_audio\_file.mp3"

with open(file\_path, 'rb') as audio\_file: response = client.audio.transcription.create( file=audio\_file, file\_type="mp3" )

print("转录的文本：", response.transcription) 音频翻译与转录示例 本部分将提供如何将音频翻译并转录为英文的示例代码。

注意事项 确保上传的文件符合支持的格式和大小限制。 在使用音频翻译与转录功能时，准确指定源语言和目标语言将有助于提高转录的准确性。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.afarensis.com/yu-yin-zhuan-wen-ben/gai-shu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
