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

windows support / Temp wav file error #13

Open
aroslanov opened this issue Feb 8, 2024 · 8 comments
Open

windows support / Temp wav file error #13

aroslanov opened this issue Feb 8, 2024 · 8 comments
Labels
feature request New feature or request

Comments

@aroslanov
Copy link

When I run sample.py locally on Windows 11, the code crashes on line 84 of enhancer.py.

Exception has occurred: LibsndfileError
Error opening 'C:\\Users\\user\\AppData\\Local\\Temp\\tmpms4y14wd.wav': System error.
  File "D:\metavoice-src\fam\llm\enhancers.py", line 84, in __call__
    save_audio(output_file, enhanced, self.df_state.sr())
  File "D:\metavoice-src\fam\llm\sample.py", line 506, in _sample_utterance_batch
    enhancer(str(wav_file) + ".wav", enhanced_tmp.name)
  File "D:\metavoice-src\fam\llm\sample.py", line 544, in sample_utterance
    return _sample_utterance_batch(
  File "D:\metavoice-src\fam\llm\sample.py", line 695, in <module>
    sample_utterance(
soundfile.LibsndfileError: Error opening 'C:\\Users\\user\\AppData\\Local\\Temp\\tmpms4y14wd.wav': System error.

After adding a few breakpoints, I discovered that a zero-length WAV file appears at the temporary path before the crash. However, it gets deleted at the moment of the crash. On the other hand, the WAV file in the samples directory is being created successfully. Could it be an issue with the enhancer?

@sidroopdaska
Copy link
Member

We dont have a windows environment at hand. Would greatly appreciate your help in debugging and resolving this via a PR :)

@addictivepixels
Copy link

@aroslanov @sidroopdaska - Check out my fork for the changed I made to get it running in Windows 11 (23H2) / Python 3.10.13. Let me know if anything doesn't make sense (and pardon my notes 😆)

@freedave
Copy link

I have the same issue on Windows 11

@vatsalaggarwal
Copy link
Member

We don't have windows environment on hand unfortunately... @freedave did you try @addictivepixels fork?

@addictivepixels could you push a PR for the fix?

@aroslanov
Copy link
Author

@aroslanov @sidroopdaska - Check out my fork for the changed I made to get it running in Windows 11 (23H2) / Python 3.10.13. Let me know if anything doesn't make sense (and pardon my notes 😆)

I finally had a chance to try it, Pip crashes on flash-attn install. Inference crashes on NameError: name 'flash_attn_qkvpacked_func' is not defined

@aroslanov
Copy link
Author

@vatsalaggarwal @addictivepixels, I manually installed flash-attn from a wheel to @addictivepixels fork, and now it works like a charm on Windows 11.
@addictivepixels, is it possible to open an Issues section in your fork? I would change torch>=2.1.0 to torch==2.1.0 in requirements.txt

@addictivepixels
Copy link

@aroslanov Absolutely! Glad you were able to get it working!

@vatsalaggarwal DM me (here or Discord) and I'll provision you a bare-metal Windows environment in my home-lab if you're interested. Connectivity shouldn't be an issue - Symmetrical 5Gbps Fiber connection.

@vatsalaggarwal
Copy link
Member

@addictivepixels what's your discord? Don't think GitHub has DMs?

Could you upstream your changes as a PR in the meanwhile please, and I can have a look at them / try to get them merged in!

@vatsalaggarwal vatsalaggarwal changed the title Temp wav file error windows support / Temp wav file error Mar 4, 2024
@vatsalaggarwal vatsalaggarwal added the feature request New feature or request label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants