Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,29 +8,8 @@ from llm import query_llm, extract_structured_data
|
|
| 8 |
from reporting import generate_enhanced_csv, generate_enhanced_pdf
|
| 9 |
from dashboard import generate_comprehensive_dashboard
|
| 10 |
from validation import validate_transcript_quality, check_data_completeness
|
| 11 |
-
from audio_transcriber import transcribe_with_diarization_streaming
|
| 12 |
|
| 13 |
-
def preprocess_audio(audio_files, num_speakers):
|
| 14 |
-
"""Convert audio to transcripts"""
|
| 15 |
-
if not audio_files:
|
| 16 |
-
return None, "No audio files provided"
|
| 17 |
-
|
| 18 |
-
transcript_paths = []
|
| 19 |
-
status = ""
|
| 20 |
-
|
| 21 |
-
for audio in audio_files:
|
| 22 |
-
try:
|
| 23 |
-
# Get the actual file path
|
| 24 |
-
audio_path = audio.name if hasattr(audio, 'name') else str(audio)
|
| 25 |
-
|
| 26 |
-
transcript_path = transcribe_with_diarization(audio_path, num_speakers)
|
| 27 |
-
transcript_paths.append(transcript_path)
|
| 28 |
-
status += f"✓ {os.path.basename(audio_path)} → {transcript_path}\n"
|
| 29 |
-
except Exception as e:
|
| 30 |
-
status += f"✗ {os.path.basename(audio_path)}: {str(e)}\n"
|
| 31 |
-
|
| 32 |
-
# Return list of paths for file component
|
| 33 |
-
return transcript_paths if transcript_paths else None, status
|
| 34 |
|
| 35 |
|
| 36 |
def analyze(files, file_type, user_comments, role_hint, debug_mode, interviewee_type, progress=gr.Progress()):
|
|
|
|
| 8 |
from reporting import generate_enhanced_csv, generate_enhanced_pdf
|
| 9 |
from dashboard import generate_comprehensive_dashboard
|
| 10 |
from validation import validate_transcript_quality, check_data_completeness
|
| 11 |
+
#from audio_transcriber import transcribe_with_diarization_streaming
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
def analyze(files, file_type, user_comments, role_hint, debug_mode, interviewee_type, progress=gr.Progress()):
|