Skip to content

Conversation

@ftnext
Copy link
Collaborator

@ftnext ftnext commented May 5, 2025

@ftnext ftnext requested a review from Copilot May 5, 2025 06:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds new command-line options to support passing a prompt for Whisper-based recognition and to enable verbose logging for debugging the transcription API call.

  • Added --prompt and --verbose CLI arguments in openai.py
  • Refactored the logging configuration to output debug information when verbose mode is enabled
  • Updated parameter handling in base.py to aggregate CLI arguments into a parameters dictionary

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
speech_recognition/recognizers/whisper_api/openai.py Added logging configuration and new CLI options (--prompt, --verbose) to control debug output and parameter handling.
speech_recognition/recognizers/whisper_api/base.py Updated parameter pass-through and added debug logging of parameters.

parser.add_argument("-v", "--verbose", action="store_true")
args = parser.parse_args()

if args.verbose:
Copy link

Copilot AI May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a check to avoid attaching multiple console handlers to the 'speech_recognition' logger if the verbose block is executed more than once, which may result in duplicate log entries.

Copilot uses AI. Check for mistakes.
@ftnext ftnext merged commit c988e48 into Uberi:master May 6, 2025
8 checks passed
@ftnext ftnext deleted the feature/pass-prompt-openai branch May 18, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant