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

Chunked Audio not Playing #800

Open
judeleonard opened this issue Jul 8, 2024 · 0 comments
Open

Chunked Audio not Playing #800

judeleonard opened this issue Jul 8, 2024 · 0 comments

Comments

@judeleonard
Copy link

judeleonard commented Jul 8, 2024

# I am currently building an interface using streamlit for audio anotation to manually chunk a bunch of audio files

 audio_path = os.path.join(selected_directory, selected_audio_file)
 audio = AudioSegment.from_file(audio_path, format="mp3")
 audio_file = open(audio_path, 'rb')
 audio_bytes = audio_file.read()
 
# here i am using streamlit to play the audio to see what it sounds like

st.audio(audio_bytes, format='audio/mp3') # this works just fine.

# the issue starts from here

 segment = audio[start_time:end_time]
 chunks = split_on_silence(segment, min_silence_len=min_silence_len, silence_thresh=silence_thresh, keep_silence=keep_silence)

Expected behavior

I should be able to play the chunked audios

Actual behavior

None of the chunked audios are playable

System configuration

  • Python version: 3.11
  • Pydub version: 0.25.1
  • ffmpeg or avlib?:
  • ffmpeg/avlib version:

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

Sorry but I am not allowed to share the audio.

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

1 participant