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

Output to user define location #183

Open
ajeema opened this issue Mar 13, 2024 · 2 comments · May be fixed by #224
Open

Output to user define location #183

ajeema opened this issue Mar 13, 2024 · 2 comments · May be fixed by #224
Assignees

Comments

@ajeema
Copy link

ajeema commented Mar 13, 2024

I've tried to look through documentation of other issues but have yet to find a clear solution.

using a very simple test
`from whisper_live.client import TranscriptionClient

client = TranscriptionClient(
"localhost",
9090,
lang="en",
translate=False,
model="small",
use_vad=False
)

client(
hls_url="http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8")
`

How can I define a location to save the text to?

@zoq
Copy link
Contributor

zoq commented Mar 13, 2024

Hello, are you using the faster_whisper backend? Or the TensorRT backend? in the first case, the output is saved as an srt file:

if self.server_backend == "faster_whisper":
self.write_srt_file(self.srt_file_path)

@zoq
Copy link
Contributor

zoq commented Mar 13, 2024

I can see that the srt file location is not exposed to the Transcription client:

def __init__(self, host, port, lang=None, translate=False, model="small", use_vad=True):
self.client = Client(host, port, lang, translate, model, srt_file_path="output.srt", use_vad=use_vad)

I'll open a PR with the change.

@makaveli10 makaveli10 self-assigned this Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants