* Added VAD removed audio duration to TranscriptionInfo object
Along with the duration of the original audio, this commit adds the seconds of audio removed by the VAD to the returned info obj
* Chaning naming for duration_after_vad
Instead of the property returning the audio duration removed, it now returns the final duration after the vad.
If vad_filter is False or if it doesn't remove any audio, the original duration is returned.
* Resolve Inference Selection Bug
* Refactor for better readability
* Filter out results with compression_ratio
* Refactor to avoid variable repetition
* Fix incorrect index and perform minor refactoring
* Remove final_temperature variable
* transcribe: return all language probabilities if requested
If return_all_language_probs is True, TranscriptionInfo structure
will have a list of tuples reflecting all language probabilities
as returned by the model.
* transcribe: fix docstring
* transcribe: remove return_all_lang_probs parameter
* Implement VadOptions
* Fix line too long
./faster_whisper/transcribe.py:226:101: E501 line too long (111 > 100 characters)
* Reformatted files with black
* black .\faster_whisper\vad.py
* black .\faster_whisper\transcribe.py
* Fix import order with isort
* isort .\faster_whisper\vad.py
* isort .\faster_whisper\transcribe.py
* Made recommended changes
Recommended in https://github.com/guillaumekln/faster-whisper/pull/198
* Fix typing of vad_options argument
---------
Co-authored-by: Guillaume Klein <guillaumekln@users.noreply.github.com>
* Use cache_dir instead of local_dir
* Fix unit test
* Use cache_dir and preserve local_dir parameter
* Remove blank line at the end
* Disable ut
* Implement download_root suggestion
* Use cache_dir=download_root
* Add transcription_options to AudioInfo
It would be great if we can include the transcription_options in AudioInfo.
My application is only making a few changes but leaving the rest as default.
However, I would like to record down all settings (including those that I did not specify) so that the audio can be transcribed again identically in future if need be.
* Make TranscriptionOptions appear before AudioInfo
* Remove unnecessary whitespace
* Support VAD filter
* Generalize function collect_samples
* Define AudioSegment class
* Only pass prompt and prefix to the first chunk
* Add dict argument vad_parameters
* Fix isort format
* Rename method
* Update README
* Add shortcut when the chunk offset is 0
* Reword readme
* Fix end property
* Concatenate the speech chunks
* Cleanup diff
* Increase default speech pad
* Update README
* Increase default speech pad
* Automatically download converted models from the Hugging Face Hub
* Remove unused import
* Remove non needed requirements in dev mode
* Remove extra index URL when pip install in CI
* Allow downloading to a specific directory
* Update docstring
* Add argument to disable the progess bars
* Fix typo in docstring
* Add word-level timestamps
* Fix alignment between the segments and the lists of words
* Fix truncated words list when the replacement character is decoded
* Check for empty text_tokens
* Add usage example in the readme
* Update ctranslate2 to 3.9
* Skip empty segment
* Set typing for the new methods