alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
896 stars 243 forks source link

Information on saving as .srt and/or .vtt? #141

Closed dev2devportal closed 2 years ago

dev2devportal commented 2 years ago

Greetings,

We are successfully using Vosk server with Jigasi for real-time closed captions.

We've been using wav2letter / flashlight-asr for offline human readable transcript from the Jibri recorded meeting successfully, because of the higher accuracy.

Now we're trying to create both .srt and .vtt files from these Jitsi meetings, but having trouble finding information on how to do so with either tool. So we found about ten .vtt converters, but now trying to find .srt.

This all seems like a lot of extra steps when we're already running Vosk during the meeting. I had hoped it would be possible to use vosk to just create all of them at once, is this possible?

Is there a command/config switch we can enable for Vosk to automatically save (in either real-time or offline mode):

  1. Human readable transcript file
  2. And an .srt formatted file
  3. And a .vtt formatted file ?

It would be so very nice if we could just handle all of this with one set of tools related to Vosk. Really appreciate suggestions on each part, and any specific config or command line options that would make this possible. Thanks kindly!

nshmyrev commented 2 years ago

Hello

Vosk server just provides transcription to client. It is a matter of client to save them properly. You can save srt files from python client like this:

https://github.com/alphacep/vosk-server/blob/master/websocket/test_srt.py

For Jigasi you have to modify Jigasi itself, you need to modify the class like this:

https://github.com/jitsi/jigasi/blob/master/src/main/java/org/jitsi/jigasi/transcription/LocalJsonTranscriptHandler.java

you can use java srt library like https://github.com/JDaren/subtitleConverter

dev2devportal commented 2 years ago

@nshmyrev Thank you very much. That is helpful. I'll share any challenges or successes so that others can benefit. Regards!

nshmyrev commented 2 years ago

Sure, let us know