ciyidogan commited on
Commit
df62fa9
·
verified ·
1 Parent(s): 371a017

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -36
app.py CHANGED
@@ -487,42 +487,6 @@ def health_check():
487
  }
488
  }
489
 
490
- # ---------------- Test Endpoint -----------------
491
- @app.get("/debug/test_audio")
492
- async def debug_test_audio():
493
- """Son oluşturulan audio dosyalarını test et"""
494
- import glob
495
-
496
- # En son oluşturulan dosyaları bul
497
- raw_files = glob.glob("/tmp/raw_audio_*.wav")
498
- trimmed_files = glob.glob("/tmp/trimmed_audio_*.wav")
499
-
500
- results = {}
501
-
502
- if raw_files:
503
- latest_raw = max(raw_files, key=os.path.getctime)
504
- result = subprocess.run([
505
- 'python', '/app/stt/test_single_wav.py', latest_raw
506
- ], capture_output=True, text=True, cwd='/app/stt')
507
- results['raw'] = {
508
- 'file': latest_raw,
509
- 'stdout': result.stdout,
510
- 'stderr': result.stderr
511
- }
512
-
513
- if trimmed_files:
514
- latest_trimmed = max(trimmed_files, key=os.path.getctime)
515
- result = subprocess.run([
516
- 'python', '/app/stt/test_single_wav.py', latest_trimmed
517
- ], capture_output=True, text=True, cwd='/app/stt')
518
- results['trimmed'] = {
519
- 'file': latest_trimmed,
520
- 'stdout': result.stdout,
521
- 'stderr': result.stderr
522
- }
523
-
524
- return results
525
-
526
  # ---------------- Serve static files ------------------------------------
527
  # UI static files (production build)
528
  static_path = Path(__file__).parent / "static"
 
487
  }
488
  }
489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  # ---------------- Serve static files ------------------------------------
491
  # UI static files (production build)
492
  static_path = Path(__file__).parent / "static"