Skip to content

Replace print statements with logging in transcription.py #380

@filthyrake

Description

@filthyrake

Summary

The worker/transcription.py file uses 27+ print() statements instead of Python's logging module.

Current Behavior

print(f"Loading Whisper model: {WHISPER_MODEL}...")
print("Model loaded successfully")
print(f"  Transcribing: {audio_path.name}")

Expected Behavior

logger.info(f"Loading Whisper model: {WHISPER_MODEL}...")
logger.info("Model loaded successfully")
logger.debug(f"Transcribing: {audio_path.name}")

Files to Modify

  • worker/transcription.py (~27 print statements)

Implementation Steps

  1. Add import logging and create a module logger: logger = logging.getLogger(__name__)
  2. Replace all print() calls with appropriate log levels
  3. Run tests: pytest tests/test_transcription*.py

Acceptance Criteria

  • No print() statements remain in the file
  • All logging uses appropriate log levels
  • Existing tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions