def change_speed(body, speed=<NUM_LIT:1>):
if speed == <NUM_LIT:1>:<EOL><INDENT>return body<EOL><DEDENT>length = int(len(body) * speed)<EOL>rv = bytearray(length)<EOL>step = <NUM_LIT:0><EOL>for v in body:<EOL><INDENT>i = int(step)<EOL>while i < int(step + speed) and i < length:<EOL><INDENT>rv[i] = v<EOL>i += <NUM_LIT:1><EOL><DEDENT>step += speed<EOL><DEDENT>return rv<EOL>
Change the voice speed of the wave body.