Spaces:
Sleeping
Sleeping
Commit
·
3c28e32
1
Parent(s):
5887dfb
Revert portg
Browse files
app.py
CHANGED
|
@@ -18,6 +18,7 @@ import asyncio
|
|
| 18 |
import uvicorn
|
| 19 |
import socket
|
| 20 |
from queue import Queue
|
|
|
|
| 21 |
# Simplified configuration parameters
|
| 22 |
SILENCE_THRESHS = [0, 0.4]
|
| 23 |
FINAL_TRANSCRIPTION_MODEL = "distil-large-v3"
|
|
@@ -559,19 +560,7 @@ class RealtimeSpeakerDiarization:
|
|
| 559 |
print(f"Error feeding audio data: {e}")
|
| 560 |
|
| 561 |
|
| 562 |
-
# FastRTC Audio Handler
|
| 563 |
-
# FastRTC Audio Handler for Real-time Diarization
|
| 564 |
# FastRTC Audio Handler for Real-time Diarization
|
| 565 |
-
import asyncio
|
| 566 |
-
import numpy as np
|
| 567 |
-
from fastrtc import AsyncStreamHandler, Stream
|
| 568 |
-
from fastapi import FastAPI, APIRouter
|
| 569 |
-
import gradio as gr
|
| 570 |
-
import time
|
| 571 |
-
import os
|
| 572 |
-
import threading
|
| 573 |
-
from queue import Queue
|
| 574 |
-
import json
|
| 575 |
|
| 576 |
class DiarizationHandler(AsyncStreamHandler):
|
| 577 |
def __init__(self, diarization_system):
|
|
|
|
| 18 |
import uvicorn
|
| 19 |
import socket
|
| 20 |
from queue import Queue
|
| 21 |
+
import time
|
| 22 |
# Simplified configuration parameters
|
| 23 |
SILENCE_THRESHS = [0, 0.4]
|
| 24 |
FINAL_TRANSCRIPTION_MODEL = "distil-large-v3"
|
|
|
|
| 560 |
print(f"Error feeding audio data: {e}")
|
| 561 |
|
| 562 |
|
|
|
|
|
|
|
| 563 |
# FastRTC Audio Handler for Real-time Diarization
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
|
| 565 |
class DiarizationHandler(AsyncStreamHandler):
|
| 566 |
def __init__(self, diarization_system):
|