Like the infinite monkeys typing Shakespeare, but with audio instead.
If there was a program that created a series of sounds at random intervals, pitches, amplitudes, etc., how long would it take to produce an output that sounds like music, some sort of recognisable recording (e.g. a bell ring, a dog barking), or perhaps even a human voice?


I feel like people here are arguing about technicalities, when the answer simply is that there is no way to know. If it is completely random, it could create a melody in the first 5 seconds. Or in 5 years from now.
You could only decide on a lower bound, i.e. for anything to be recognizable, you might need at least 100 ms of it, so it will take at least 100 ms to produce that.
But as soon as those 100 ms are over, all bets are off. At any moment, it could queue the appropriate sound that makes you recognize the previous seconds as some melody or sound.