Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

What is the reason to store file in device? #1291

Closed
zhangshaohu opened this issue Feb 7, 2022 · 5 comments
Closed

What is the reason to store file in device? #1291

zhangshaohu opened this issue Feb 7, 2022 · 5 comments
Labels
question Further information is requested
Projects

Comments

@zhangshaohu
Copy link

In interfaces.py:
# Storing waveform in the specified device
wavs, wav_lens = wavs.to(self.device), wav_lens.to(self.device)
Why do we need to save the audio? It takes so many resources! I commented on all the lines but it still stores the speech file. How can we don't save the audio file?

@Gastron
Copy link
Collaborator

Gastron commented Feb 7, 2022

This does not save the audio in any new hard drive or anything like that. Here basically the .to() methods just move data from CPU-side RAM to GPU-side VRAM. This is of course absolutely necessary - the data needs to be where the computation happens.

@Gastron Gastron closed this as completed Feb 7, 2022
@zhangshaohu
Copy link
Author

Thank you for your response. I used the simple demo below
classifier = foreign_class(source="speechbrain/emotion-recognition-wav2vec2-IEMOCAP", pymodule_file="custom_interface.py", classname="CustomEncoderWav2vec2Classifier")
but every time it copied the original speech file to the local directory. Anyone experienced this?

@Gastron
Copy link
Collaborator

Gastron commented Feb 11, 2022

Ah. I replied a little hastily last time. The code you quoted indeed does what I say, but I understand what you were really after. The fetch functionality does this type of copying/symlinking, and that has turned out to be a very annoying feature for many users. However we're going to implement changes soon. See discussion e.g. in PR #1268

@Gastron Gastron reopened this Feb 11, 2022
@zhangshaohu
Copy link
Author

This commit solve this problem
stachu86@887ed86

@Gastron
Copy link
Collaborator

Gastron commented Feb 12, 2022

Yes, it's just that we're trying to support all these different sources.

@anautsch anautsch added this to To do in CI/CD via automation Apr 21, 2022
@anautsch anautsch moved this from To do to Performance & housekeeping in CI/CD Apr 21, 2022
@Adel-Moumen Adel-Moumen added the question Further information is requested label Sep 28, 2022
@speechbrain speechbrain locked and limited conversation to collaborators Oct 28, 2022
@Adel-Moumen Adel-Moumen converted this issue into discussion #1635 Oct 28, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
No open projects
CI/CD
Performance & housekeeping
Development

No branches or pull requests

3 participants