VaRest icon indicating copy to clipboard operation
VaRest copied to clipboard

How can I Request binary file

Open Emilia0608 opened this issue 1 year ago • 0 comments

In Unreal Engine, I want to send request using wav file and I wrote it in python like below How can I request binary file or wav file?

import json
import requests

config = {}
resp = requests.post(
    'https://openapi.vito.ai/v1/transcribe',
    headers={'Authorization': 'bearer '+token},
    data={'config': '{}'},
    files={'file':open('hello.wav', 'rb')}
)
resp.raise_for_status()
print(resp.json())

Emilia0608 avatar Oct 22 '23 10:10 Emilia0608