File size: 903 Bytes
ab58fb5
9d727e3
 
f3e24b8
ab58fb5
253b4e4
 
 
 
 
 
 
 
 
 
 
 
 
b03d0c5
4ebf6a9
b03d0c5
 
 
 
 
 
 
 
 
 
 
4ebf6a9
34b0634
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import streamlit as st
import whisper
import os
from transformers import pipeline

def transcribe_audio(audiofile):

    st.session_state['audio'] = audiofile

    print(f"audio_file_session_state:{st.session_state['audio'] }")

    #get size of audio file
    audio_size = round(os.path.getsize(st.session_state['audio'])/(1024*1024),1)

    print(f"audio file size:{audio_size}")

    return audio_size

st.markdown("# Podcast Q&A")

st.markdown(
        """
        This helps understand information-dense podcast episodes by doing the following:
        - Speech to Text transcription - using OpenSource Whisper Model
        - Summarizes the episode
        - Allows you to ask questions and returns direct quotes from the episode.

        """
        )

audio_file = st.file_uploader("Upload audio copy of file", key="upload", type=['.mp3'])


if audio_file:
    transcribe_audio(audio_file)