Python, Artificial Intelligence, Data Science, Music, Philosophy.
to do so is below: def delay(bytes,params,offset_ms): # generate offset offset= params.sampwidth*offset_ms*int(params.framerate/1000) # add silence in the beginning beginning= b'\0'*offset #remove space from the end end= bytes[:-offset] # concat bytes with both beginning and end with sample width