Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ASR+Diarization handler that works natively with Inference Endpoints.
|
| 2 |
+
|
| 3 |
+
Example payload:
|
| 4 |
+
```python
|
| 5 |
+
import base64
|
| 6 |
+
import requests
|
| 7 |
+
|
| 8 |
+
API_URL = "<your endpoint URL>"
|
| 9 |
+
filepath = "/path/to/audio"
|
| 10 |
+
|
| 11 |
+
with open(filepath, 'rb') as f:
|
| 12 |
+
audio_encoded = base64.b64encode(f.read())
|
| 13 |
+
|
| 14 |
+
data = {
|
| 15 |
+
"inputs": audio_encoded,
|
| 16 |
+
"parameters": {
|
| 17 |
+
"batch_size": 24
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
resp = requests.post(API_URL, json=data, headers={"Authorization": "Bearer <your token>"})
|
| 22 |
+
print(resp.json())
|
| 23 |
+
```
|