shirayu / whispering

Streaming transcriber with whisper
MIT License
682 stars 53 forks source link

How to get transcription language in websocket response ? #28

Closed charles-zablit closed 2 years ago

charles-zablit commented 2 years ago

Hello, thank you for this project, it looks incredible!

When using websockets with websocket_client, is there a way to get the detected language in the transcription result? Something like:

{
  "start": 11.22,
  "end": 16.580000000000002, 
  "text": "This is a test sentence.",
  "detected_language": "en",  <- here
  "temperature": 0.0,
  "avg_logprob": -0.46804791405087426,
  "compression_ratio": 0.9428571428571428,
  "no_speech_prob": 0.23318801820278168
}

Thanks in advance !

shirayu commented 2 years ago

Hello, thank you! Unfortunately, the feature does not exist currently, but it can be implemented . I open the issue #30 and will re-design the protocol of websocket.

charles-zablit commented 2 years ago

Awesome, thanks!

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 21 days with no activity.