南瓜AI

登录 注册
必读
网站从现在开始无需邀请码就可使用B200,取消了linuxdo登陆,可以直接注册账号登陆,正在上架hunyuanimage3.0模型。南瓜ai是一个永久提供免费GPU算力的公益网站,包括不限于A100,H100,B200等大显存GPU,本站承诺永不收费,要么完全免费,要么关闭网站。如果遇到推理失败,可以切换GPU再次推理。至于网站有时候总是要登录,是因为我修改了网站,然后重启了服务器

IndexTTS-2-Demo

IndexTTS2 是由Bilibili 开发的下一代文本转语音模型,于2025年9月8日正式开源。 该模型在情感表达和时长控制方面实现重大突破,被社区誉为"最逼真、最具表现力的TTS 模型"。

API 使用示例

A100(80G)

curl -X POST "https://pumpkinai.space/api/v1/spaces/run" \
-H "Authorization: Bearer YOUR_API_KEY_PLACEHOLDER" \
-H "Content-Type: application/json" \
-d '{
  "space_name": "IndexTTS-2-Demo",
  "gpu_template": "A100(80G)",
  "prompt": "Your creative prompt here"
}'
import requests
import time
import json

API_KEY = "YOUR_API_KEY_PLACEHOLDER"
BASE_URL = "https://pumpkinai.space/api/v1"
PAYLOAD = {
    "space_name": "IndexTTS-2-Demo",
    "gpu_template": "A100(80G)",
    "prompt": "Your creative prompt here"
}

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# 1. Start task
print(">>> Starting task...")
start_response = requests.post(f"{BASE_URL}/spaces/run", json=PAYLOAD, headers=headers)
start_response.raise_for_status()
task_id = start_response.json()["task_id"]
print(f"Task started successfully, Task ID: {task_id}")

# 2. Poll for status
print("\n>>> Polling for status...")
while True:
    status_response = requests.get(f"{BASE_URL}/task/{task_id}/status", headers=headers)
    status_response.raise_for_status()
    data = status_response.json()
    status = data.get("status")
    print(f"Current task status: {status}")

    if status in ["completed", "failed"]:
        print("\n--- Task Finished ---")
        print(json.dumps(data, indent=2, ensure_ascii=False))
        break

    time.sleep(5)
import requests
import json

API_KEY = "YOUR_API_KEY_PLACEHOLDER"
BASE_URL = "https://pumpkinai.space/api/v1"
PAYLOAD = {
    "space_name": "IndexTTS-2-Demo",
    "gpu_template": "A100(80G)",
    "prompt": "Your creative prompt here",
    "stream": True
}

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

print(">>> Starting stream...")
with requests.post(f"{BASE_URL}/spaces/run", json=PAYLOAD, headers=headers, stream=True) as response:
    response.raise_for_status()
    for line in response.iter_lines():
        if line:
            print(line.decode('utf-8'))

生成结果

等待任务开始...

状态信息

当前状态: 就绪