Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,6 @@ dmypy.json
.pyre/

*.wav
run_*.sh
run_*.sh
pixi*
.pixi
20 changes: 19 additions & 1 deletion whisper_fastapi_online_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,22 @@ def format_time(seconds):
return str(timedelta(seconds=int(seconds)))


logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
# Configure logging for all modules
logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s")

# Set root logger level
logging.getLogger().setLevel(logging.WARNING)




# Configure main module logger
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)




##### LOAD ARGS #####

parser = argparse.ArgumentParser(description="Whisper FastAPI Online Server")
Expand Down Expand Up @@ -70,6 +81,13 @@ def format_time(seconds):
add_shared_args(parser)
args = parser.parse_args()


# Configure specific loggers for different modules
logging.getLogger("whisper_streaming_custom").setLevel(logging.getLevelName(args.log_level))
logging.getLogger("diarization").setLevel(logging.getLevelName(args.log_level))



SAMPLE_RATE = 16000
CHANNELS = 1
SAMPLES_PER_SEC = SAMPLE_RATE * int(args.min_chunk_size)
Expand Down