Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using --tag with vtt format (CLI) #362

Closed
mangonerd opened this issue May 24, 2024 · 1 comment
Closed

Error when using --tag with vtt format (CLI) #362

mangonerd opened this issue May 24, 2024 · 1 comment

Comments

@mangonerd
Copy link

mangonerd commented May 24, 2024

I’m using the CLI on Python 3.12.3, stable-ts-2.17.2, MacOS Sonoma 14.5

Here’s the command I’m using—
stable-ts --model tiny.en --vad true --tag '<u>' '</u>' -fw -f vtt --device mps audio.mov

Here’s the output I’m getting—

[2024-05-24 09:07:52.413] [ctranslate2] [thread 1301110] [warning] The compute type inferred from the saved model is float16, but the target device or backend do not support efficient float16 computation. The model weights have been automatically converted to use the float32 compute type instead.
Loaded Faster-Whisper tiny.en model   
Detected Language: english
Transcribe: 100%|████████████████████████████████████████████████████████████████| 38.59/38.59 [00:03<00:00, 12.31sec/s]
VAD: 100%|███████████████████████████████████████████████████████████████████████| 38.59/38.59 [00:01<00:00, 28.74sec/s]
Adjustment: 100%|█████████████████████████████████████████████████████████████| 38.14/38.14 [00:00<00:00, 36808.73sec/s]
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/bin/stable-ts", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/stable_whisper/whisper_word_level/cli.py", line 735, in cli
    _cli(cmd=cmd, _cache=cache)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/stable_whisper/whisper_word_level/cli.py", line 727, in _cli
    call_method_with_options(save_method, save_options)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/stable_whisper/whisper_word_level/cli.py", line 536, in call_method_with_options
    return method(**options)
           ^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/stable_whisper/text_output.py", line 319, in result_to_srt_vtt
    return result_to_any(
           ^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/stable_whisper/text_output.py", line 240, in result_to_any
    segments = to_word_level_string_callback(segments, tag)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'list' object is not callable

if I add --word_level false it works, but the tags aren’t added.

Please keep in mind I’m not a programmer. Thanks in advance :)

jianfch added a commit that referenced this issue May 24, 2024
-fixed error from using `tag`/`--tag` when output format is VTT and `word_level=True`
@jianfch
Copy link
Owner

jianfch commented May 24, 2024

It should be fixed after 3997ef1.

@jianfch jianfch closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants