Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i'm sure that there's a simple way to get the API to do this but i figured i would ask here #31

Open
Leggyweggy opened this issue Aug 19, 2023 · 1 comment

Comments

@Leggyweggy
Copy link

what would i need to add to the code to get the transcription to auto translate to English? i have another command line tool that uses whisper that accepts audio files and a bunch of different arguments for what whisper should do with it, including translation in the form of the "--task translate" argument. in the main transcribe_demo.py file i see where a couple arguments are being set for program, so i simply tried adding a similar line containing that argument, but i couldn't get it to work.

thoughts?

@davabase
Copy link
Owner

Change this line from

result = audio_model.transcribe(temp_file, fp16=torch.cuda.is_available())

to

result = audio_model.transcribe(temp_file, fp16=torch.cuda.is_available(), task='translate')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants