File size: 567 Bytes
b5a0a8e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from pydub import AudioSegment, silence
myaudio = AudioSegment.from_wav("test_audios/audio.wav")
dBFS=myaudio.dBFS
silence = silence.detect_silence(
myaudio,
min_silence_len=1000,
silence_thresh=dBFS-16
)
silence = [((start/1000),(stop/1000)) for start,stop in silence] #convert to sec
print(silence)
#TODO: Integrate with audio middleware demo
#TODO: For each slice, do the ASR (speech_recognition). Each call
# is independant and can continue to Translation and TTS, however,
# they are only applied to multimedia outputs once all are ready |