Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

How can I Request binary file #424

Open
Emilia0608 opened this issue Oct 22, 2023 · 0 comments
Open

How can I Request binary file #424

Emilia0608 opened this issue Oct 22, 2023 · 0 comments

Comments

@Emilia0608
Copy link

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())
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant