MahmoudAshraf97 / ctc-forced-aligner

Text to speech alignment using CTC forced alignment
150 stars 31 forks source link

Problem in unpacking load_alignment_model fucntion #20

Closed 01Ashish closed 2 months ago

01Ashish commented 2 months ago

having issue while unpacking load_alignment_model

ValueError: not enough values to unpack (expected 3, got 2) Traceback: File "/usr/local/lib/python3.10/dist-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() File "/usr/local/lib/python3.10/dist-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec exec(code, module.dict) File "/content/app-streamlit.py", line 262, in main() File "/content/app-streamlit.py", line 239, in main transcript = transcribe(temp_file_path) File "/content/app-streamlit.py", line 89, in transcribe alignment_model, alignment_tokenizer,alignment_dictionary = load_alignment_model(

in ctc forced aligner repo you can check for this function ctc_forced_aligner/alignment_utils.py

load_alignment_model returning 2 values but get_alignments function using 3 very same values received from the above mentioned function Please somebody guide me

01Ashish commented 2 months ago

I have fixed this issue by removing var alignment dictionary and instead of passing alignment_ditionary pass alignment_tokenizer in get_alignments() function

alignment_model, alignment_tokenizer = load_alignment_model(

segments, scores, blank_id = get_alignments( emissions, tokens_starred, alignment_tokenizer, )

MahmoudAshraf97 commented 2 months ago

The usage instructions were updated recently, please check them