You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frompydubimportAudioSegmentfrompydub.silenceimportsplit_on_silence# Load the audio filesound_file=AudioSegment.from_wav("audio.wav")
# Split the audio file based on silenceaudio_chunks=split_on_silence(sound_file,
# Must be silent for at least half a secondmin_silence_len=500,
# Consider it silent if quieter than -16 dBFSsilence_thresh=-16
)
# Export the split audio chunksfori, chunkinenumerate(audio_chunks):
out_file="./splitAudio/chunk{0}.wav".format(i)
print("exporting", out_file)
chunk.export(out_file, format="wav")
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: