MahmoudAshraf97 / ctc-forced-aligner

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

Error when using provided sample python #6

Closed abeiro closed 5 months ago

abeiro commented 5 months ago
Traceback (most recent call last):
  File "/opt/ai/lipsync/ctc-forced-aligner/test.py", line 41, in <module>
    segments, scores, blank_id = get_alignments(
                                 ^^^^^^^^^^^^^^^
  File "/opt/ai/lipsync/ctc-forced-aligner/.venv/lib/python3.11/site-packages/ctc_forced_aligner/alignment_utils.py", line 232, in get_alignments
    path, scores = forced_align(
                   ^^^^^^^^^^^^^
  File "/opt/ai/lipsync/ctc-forced-aligner/.venv/lib/python3.11/site-packages/ctc_forced_aligner/alignment_utils.py", line 206, in forced_align
    paths, scores = forced_align_cpp(
                    ^^^^^^^^^^^^^^^^^
MemoryError: std::bad_alloc

Using terminal script works fine.

ctc-forced-aligner --audio_path 1.wav --text_path 1.txt --language "eng" --romanize

MahmoudAshraf97 commented 5 months ago

Can you provide the audio and the text file?

abeiro commented 5 months ago

My fault. Seems 1.txt contained garbage. Sorry!