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

speedup #555

Open
Beemaxx opened this issue Feb 19, 2021 · 2 comments
Open

speedup #555

Beemaxx opened this issue Feb 19, 2021 · 2 comments

Comments

@Beemaxx
Copy link

Beemaxx commented Feb 19, 2021

Steps to reproduce

from pydub import AudioSegment
from pydub.effects import speedup

audio = AudioSegment.from_mp3(song.mp3)
new_file = speedup(audio,1.5,150)

Expected behavior

Tell us what should happen

Export a new file with 1.5 speed without changing the pitch

Actual behavior

Tell us what happens instead

The script is running, producing no output.

Your System configuration

  • Python version: 3.6.9
  • Pydub version: pydub-0.24.1
  • ffmpeg or avlib?: ffmpeg
  • ffmpeg/avlib version: 7:3.4.8-0ubuntu0.2

Is there an audio file you can include to help us reproduce?

You can include the audio file in this issue - just put it in a zip file and drag/drop the zip file into the github issue.

@wolfred24
Copy link

I have the same issue, no audio file output:

format = file_path[-3:]
sound = AudioSegment.from_file(file_path, format=format)
# for semitones in np.linspace(-1, 1, 21):
print(f"Trnasposing multimedia file {semitones} semitones")
semitones = int(semitones) *.083
speedup(sound, 1 + semitones)
sound.export(f"multimedia/{output_filename}", format=format)

@MeldwithAI
Copy link

Hey, it is working. Just add a line to export the new audio.

from pydub import AudioSegment
from pydub.effects import speedup

audio = AudioSegment.from_mp3(song.mp3)
new_file = speedup(audio,1.5,150)
new_file.export("file.mp3", format="mp3")

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