File size: 376 Bytes
2be0040 f1a16dd 2be0040 0c86405 2be0040 0c86405 2be0040 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import requests
API_URL = "https://api-inference.huggingface.co/models/jkang/espnet2_librispeech_100_conformer_word"
headers = {"Authorization": f"Bearer {API_TOKEN}"}
def query(filename):
with open(filename, "rb") as f:
data = f.read()
response = requests.post(API_URL, headers=headers, data=data)
return response.json()
output = query("sample1.flac")
|