pop123123123 / CLI_sentence_mixing

11 stars 0 forks source link

Binary Completely Broken on Windows :c #13

Open g-l-i-t-c-h-o-r-s-e opened 1 year ago

g-l-i-t-c-h-o-r-s-e commented 1 year ago

Could you please update the windows version with the recent changes u made to the main sentence-mixing library? Would be ever so much appreciated! <3

g-l-i-t-c-h-o-r-s-e commented 1 year ago

I have installed sentence-mixing 2.0.4 as well as grabbed the new version of MFA, and am currently getting this error on Windows 10:

C:\Users\username\AppData\Local\Programs\Python\Python39\python.exe video_creator_main.py -c "vlc --play-and-exit --no-repeat --no-loop {}" .\config.json https://youtu.be/cAe2LGnRBYg
Enter a sentence: test
downloading...
'T' not recognized
Previous sentences:
Enter a sentence:
Traceback (most recent call last):
  File "C:\Users\username\Downloads\New folder (3)\CLI_sentence_mixing-master\video_creator_main.py", line 80, in <module>
    main(
  File "C:\Users\username\Downloads\New folder (3)\CLI_sentence_mixing-master\video_creator_main.py", line 22, in main
    total_timestamps, total_text, videos = loop_interface(
  File "C:\Users\username\Downloads\New folder (3)\CLI_sentence_mixing-master\cli_interface.py", line 74, in loop_interface
    available_combos = sm.process_sm(sentence, videos)
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\sentence_mixer.py", line 119, in process_sm
    combos = analyze.get_n_best_combos(
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\logic\analyze.py", line 134, in get_n_best_combos
    roots = compute_children(target_phonems[0], params.NODES, None, randomizer)
IndexError: list index out of range

Python39\python.exe video_creator_main.py -c "vlc --play-and-exit --no-repeat --no-loop {}" .\config.json https://youtu.be/_mfm7Us24P8
Enter a sentence: please
downloading...
usage: mfa_align.exe [-h] [-s SPEAKER_CHARACTERS] [-t TEMP_DIRECTORY]
                     [-j NUM_JOBS] [-v] [-c] [-d] [--config_path CONFIG_PATH]
                     corpus_directory dictionary_path acoustic_model_path
                     output_directory
mfa_align.exe: error: unrecognized arguments: --quiet --single_speaker --use_mp
'P' not recognized
Previous sentences:```
g-l-i-t-c-h-o-r-s-e commented 1 year ago

If I revert to the old Sentence_Mixing 1.1.3 version, and replace youtube-dl with yt-dlp it almost works but breaks here

"C:\Users\username\AppData\Local\Programs\Python\Python39\python.exe" sample_cli.py "Bonjour" ./config.json https://www.youtube.com/watch?v=4czmCgJryUM
Setting up corpus information...
WARNING: Some issues parsing the corpus were detected. Please run the validator to get more information.
Number of speakers in corpus: 1, average number of utterances per speaker: 39.0
Creating dictionary information...
Setting up corpus_data directory...
Generating base features (mfcc)...
Calculating CMVN...
Done with setup.
There were 10 segments/files not aligned. Please see C:\Users\username\AppData\Local\Temp\tmpvfw_0umo\unaligned.txt for more details on why alignment failed for these files.
Done! Everything took 8.991307735443115 seconds
Traceback (most recent call last):
  File "C:\Users\username\Downloads\New folder (3)\CLI_sentence_mixing-master\sample_cli.py", line 42, in <module>
    print(sm.process_sm(args.sentence, videos, args.seed)[0])
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\sentence_mixer.py", line 85, in process_sm
    combos = analyze.get_n_best_combos(
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\logic\analyze.py", line 132, in get_n_best_combos
    combos.extend(combo.get_combos())
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\model\choice.py", line 189, in get_combos
    return sum((child.get_combos() for child in self.children), [])
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\model\choice.py", line 189, in <genexpr>
    return sum((child.get_combos() for child in self.children), [])
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\model\choice.py", line 189, in get_combos
    return sum((child.get_combos() for child in self.children), [])
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\model\choice.py", line 189, in <genexpr>
    return sum((child.get_combos() for child in self.children), [])
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\model\choice.py", line 184, in get_combos
    self.children = self._create_children()
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\model\choice.py", line 177, in _create_children
    return sentence_mixing.logic.analyze.compute_children(
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\logic\analyze.py", line 37, in compute_children
    association_candidates = global_audio_data.get_candidates(target_phonem)
  File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\sentence_mixing\logic\global_audio_data.py", line 68, in get_candidates
    audio_phonems = get_transcription_dict_audio_phonem()[
KeyError: 'ZH'

Could not decode (beam too narrow)

danieldumma commented 8 months ago

The solution that worked for me was to install this version pip install sentence-mixing==2.0.1. I hope it works for you too