Views
No views yet
1import base64
2import requests
3
4API_URL = "<your endpoint URL>"
5filepath = "/path/to/audio"
6
7with open(filepath, 'rb') as f:
8 audio_encoded = base64.b64encode(f.read()).decode("utf-8")
9
10data = {
11 "inputs": audio_encoded,
12 "parameters": {
13 "batch_size": 24
14 }
15}
16
17resp = requests.post(API_URL, json=data, headers={"Authorization": "Bearer <your token>"})
18print(resp.json())