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

[Bug] extracting few audio files in same time #10

Open
AlexSmirnov9107 opened this issue Feb 15, 2022 · 3 comments
Open

[Bug] extracting few audio files in same time #10

AlexSmirnov9107 opened this issue Feb 15, 2022 · 3 comments

Comments

@AlexSmirnov9107
Copy link
Contributor

If trying extract few files in same time, progress will commit last file progress.

I think, need to make a each progress for each instance

@ryanheise
Copy link
Owner

That could be a good idea, although I doubt it is a good idea to be decoding multiple files at the same time since it is very resource intensive. Why not decode the files one after the other?

@han-tm
Copy link

han-tm commented Jun 22, 2022

That could be a good idea, although I doubt it is a good idea to be decoding multiple files at the same time since it is very resource intensive. Why not decode the files one after the other?

How can I decode one by one?

@ryanheise
Copy link
Owner

You could try something like this:

final fileNames = ['file1.mp3', 'file2.mp3', 'file3.mp3'];
for (var fn in fileNames) {
  await JustWaveform.extract(audioInFile: File(fn), audioOutFile: File('$fn.wave')).last;
}

That's the basic idea, anyway, modify it as needed to get the audio files from different input locations and store the waveform files in different output locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants