sandrohanea / whisper.net

Whisper.net. Speech to text made simple using Whisper Models
MIT License
534 stars 82 forks source link

how to retrieve diarization and how to use prompt? #40

Closed acidmeat closed 1 year ago

acidmeat commented 1 year ago

there is no interface in the binding?

sandrohanea commented 1 year ago

Hello @acidmeat ,

Prompt for the Whisper model you can provide using the extension method: WithPrompt

However, that is not used with any LLM (as some of the examples in whisper.cpp) but it's just the prompt used as the input for the transcribing / translation.

Regarding diarization, this is not in the library, but in the client implementation (main) in whisper.cpp:

https://github.com/ggerganov/whisper.cpp/blob/95b02d76b04d18e4ce37ed8353a1f0797f1717ea/examples/main/main.cpp#L237

I can implement some examples where diarization is used simillar to that "main" example. Will keep you posted.

sandrohanea commented 1 year ago

Hello @acidmeat , Diarization example is here: https://github.com/sandrohanea/whisper.net/blob/main/examples/DiarizationWhisperExample/Program.cs