使用 Hugging Face 推理终端搭建强大的“语音识别 + 说话人分割 + 投机解码”工作流


- +2
sergeipetrov, reach-vb, pcuenq, philschmid
• YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
ASR+Diarization handler that works natively with Inference Endpoints.
Example payload:
import base64
import requests
API_URL = "<your endpoint URL>"
filepath = "/path/to/audio"
with open(filepath, 'rb') as f:
audio_encoded = base64.b64encode(f.read()).decode("utf-8")
data = {
"inputs": audio_encoded,
"parameters": {
"batch_size": 24
}
}
resp = requests.post(API_URL, json=data, headers={"Authorization": "Bearer <your token>"})
print(resp.json())