Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import streamlit as st
|
|
4 |
from groq import Groq
|
5 |
import soundfile as sf
|
6 |
#from st_audiorec import st_audiorec
|
7 |
-
from audiorecorder import audiorecorder
|
8 |
|
9 |
# Load environment variables
|
10 |
api_key = os.getenv('groqwhisper')
|
@@ -15,8 +15,6 @@ if api_key is None:
|
|
15 |
# Initialize Groq client
|
16 |
client = Groq(api_key=api_key)
|
17 |
|
18 |
-
|
19 |
-
|
20 |
def process_audio(audio_data):
|
21 |
"""Process audio data and return transcription."""
|
22 |
try:
|
@@ -65,7 +63,7 @@ if audio_bytes:
|
|
65 |
transcription = process_audio((sample_rate, samples))
|
66 |
|
67 |
# Ergebnisse anzeigen
|
68 |
-
st.success(
|
69 |
-
st.subheader("Result:")
|
70 |
-
st.write(transcription)
|
71 |
#st.audio(audio_bytes_content, format='audio/wav')
|
|
|
4 |
from groq import Groq
|
5 |
import soundfile as sf
|
6 |
#from st_audiorec import st_audiorec
|
7 |
+
#from audiorecorder import audiorecorder
|
8 |
|
9 |
# Load environment variables
|
10 |
api_key = os.getenv('groqwhisper')
|
|
|
15 |
# Initialize Groq client
|
16 |
client = Groq(api_key=api_key)
|
17 |
|
|
|
|
|
18 |
def process_audio(audio_data):
|
19 |
"""Process audio data and return transcription."""
|
20 |
try:
|
|
|
63 |
transcription = process_audio((sample_rate, samples))
|
64 |
|
65 |
# Ergebnisse anzeigen
|
66 |
+
st.success(transcription)
|
67 |
+
#st.subheader("Result:")
|
68 |
+
#st.write(transcription)
|
69 |
#st.audio(audio_bytes_content, format='audio/wav')
|