Skip to content

Why run the example of "Single Audio Stream" slow ? #36

Answered by snakers4
garymmi asked this question in Q&A
Discussion options

You must be logged in to vote

Can you quantify "slow"?

When you just process the whole audio, you obviously assume that you have this audio on disk on in memory (or wherever).
Therefore you get tremendous boosts from batching. If you process files on disk - there is no point in streaming in case of PyTorch NNs.

When you do streaming, you pretend to "listen" the audio one chunk at a time like in real-life when you listen to someone.
Anyway it ends up working much more fast than real-time because in the example the python iterator does not really "wait" for audio to play, but processing audio one chunk at a time is obviously slower than just batching several chunks together.

If the speed is not enough for your applicati…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by snakers4
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #34 on February 17, 2021 07:04.