Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Mews authored Jun 8, 2024
1 parent fefa318 commit b03f978
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ In this example we take a file called `song.mp3` and make it twice as long:
```python
import simplestretch

#A factor of 2 means the song becomes twice as long
# A factor of 2 means the song becomes twice as long
simplestretch.stretch_audio("song.mp3", 2, "out.wav")
```

Expand All @@ -37,16 +37,16 @@ import simplestretch, soundfile
# But you can use any numpy ndarray representing audio
audio_data, samplerate = soundfile.read("song.mp3")

#When working with raw audio data
#You will also need to pass the audio's sample rate to the function
# When working with raw audio data
# You will also need to pass the audio's sample rate to the function
simplestretch.stretch_audio(audio_data, 2, output="out.wav", samplerate=samplerate)
```

You can also work with changes in speed rather than changes in length through the `speedup_audio` method:
```python
import simplestretch

#In this example we make the song twice as fast rather than twice as long
# In this example we make the song twice as fast rather than twice as long
simplestretch.speedup_audio("song.mp3", 2, "out.wav")
```
## CLI
Expand Down

0 comments on commit b03f978

Please sign in to comment.