Skip to content
Snippets Groups Projects
Commit 986a18af authored by Ahmet Öner's avatar Ahmet Öner
Browse files

Upgrade Whisper to v20230918

parent 7e842996
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,11 @@ Unreleased ...@@ -8,6 +8,11 @@ Unreleased
- Updated model conversion method (for Faster Whisper) to use Hugging Face downloader - Updated model conversion method (for Faster Whisper) to use Hugging Face downloader
### Changed
- Upgraded
- OpenAI Whisper to v20230918
[1.1.1] (2023-05-29) [1.1.1] (2023-05-29)
-------------------- --------------------
......
...@@ -9,7 +9,7 @@ Whisper is a general-purpose speech recognition model. It is trained on a large ...@@ -9,7 +9,7 @@ Whisper is a general-purpose speech recognition model. It is trained on a large
## Features ## Features
Current release (v1.1.1) supports following whisper models: Current release (v1.1.1) supports following whisper models:
- [openai/whisper](https://github.com/openai/whisper)@[v20230124](https://github.com/openai/whisper/releases/tag/v20230124) - [openai/whisper](https://github.com/openai/whisper)@[v20230918](https://github.com/openai/whisper/releases/tag/v20230918)
- [faster-whisper](https://github.com/guillaumekln/faster-whisper)@[0.4.1](https://github.com/guillaumekln/faster-whisper/releases/tag/v0.4.1) - [faster-whisper](https://github.com/guillaumekln/faster-whisper)@[0.4.1](https://github.com/guillaumekln/faster-whisper/releases/tag/v0.4.1)
## Usage ## Usage
......
...@@ -56,15 +56,20 @@ def language_detection(audio): ...@@ -56,15 +56,20 @@ def language_detection(audio):
def write_result( def write_result(
result: dict, file: BinaryIO, output: Union[str, None] result: dict, file: BinaryIO, output: Union[str, None]
): ):
options = {
'max_line_width': 1000,
'max_line_count': 10,
'highlight_words': False
}
if output == "srt": if output == "srt":
WriteSRT(ResultWriter).write_result(result, file=file) WriteSRT(ResultWriter).write_result(result, file=file, options=options)
elif output == "vtt": elif output == "vtt":
WriteVTT(ResultWriter).write_result(result, file=file) WriteVTT(ResultWriter).write_result(result, file=file, options=options)
elif output == "tsv": elif output == "tsv":
WriteTSV(ResultWriter).write_result(result, file=file) WriteTSV(ResultWriter).write_result(result, file=file, options=options)
elif output == "json": elif output == "json":
WriteJSON(ResultWriter).write_result(result, file=file) WriteJSON(ResultWriter).write_result(result, file=file, options=options)
elif output == "txt": elif output == "txt":
WriteTXT(ResultWriter).write_result(result, file=file) WriteTXT(ResultWriter).write_result(result, file=file, options=options)
else: else:
return 'Please select an output method!' return 'Please select an output method!'
This diff is collapsed.
...@@ -27,7 +27,7 @@ ffmpeg-python = "^0.2.0" ...@@ -27,7 +27,7 @@ ffmpeg-python = "^0.2.0"
fastapi = "^0.95.1" fastapi = "^0.95.1"
llvmlite = "^0.39.1" llvmlite = "^0.39.1"
numba = "^0.56.4" numba = "^0.56.4"
openai-whisper = "20230124" openai-whisper = "20230918"
faster-whisper = "^0.4.1" faster-whisper = "^0.4.1"
torch = [ torch = [
{markers = "sys_platform == 'darwin' and platform_machine == 'arm64'", url = "https://download.pytorch.org/whl/cpu/torch-1.13.0-cp310-none-macosx_11_0_arm64.whl"}, {markers = "sys_platform == 'darwin' and platform_machine == 'arm64'", url = "https://download.pytorch.org/whl/cpu/torch-1.13.0-cp310-none-macosx_11_0_arm64.whl"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment