Skip to content

Comments

Add language selection dropdown for Whisper transcription/translation#6

Closed
frafra wants to merge 2 commits intomainfrom
claude/issue-1-20250806-1106
Closed

Add language selection dropdown for Whisper transcription/translation#6
frafra wants to merge 2 commits intomainfrom
claude/issue-1-20250806-1106

Conversation

@frafra
Copy link
Contributor

@frafra frafra commented Aug 7, 2025

Add a comprehensive language selection dropdown to allow users to choose the source language for better transcription and translation results.

Changes

  • Added language dropdown with 50+ supported languages
  • Enhanced UI workflow with language selection step
  • Updated backend to use selected language parameter
  • Maintained backward compatibility with Norwegian default
  • Added CLI language support in translate.py

Closes #1

Generated with Claude Code

- Added comprehensive list of supported languages with auto-detect option
- Modified UI to include language selection dropdown with Norwegian as default
- Updated translate_transcribe_file() to accept and use selected language parameter
- Enhanced translate.py CLI to support language parameter
- Updated instructions to include language selection step

Co-authored-by: Francesco Frassinelli <frafra@users.noreply.github.com>
@frafra
Copy link
Contributor Author

frafra commented Aug 7, 2025

@claude can you resolve the conflicts in this PR, since main has been updated?

@claude
Copy link

claude bot commented Aug 7, 2025

Claude finished @frafra's task —— View job


✅ Merge conflicts resolved successfully!

Tasks:

  • Check current git status and fetch latest main branch
  • Identify merge conflicts between current branch and main
  • Resolve conflicts by adapting language selection to work with faster-whisper library
  • Test the resolution and ensure code works
  • Commit and push resolved changes

Summary:

I've successfully resolved the merge conflicts between this branch and main. The main issue was that main switched from openai-whisper to faster-whisper library (PR #5), while this branch was still using the old API.

Changes Made:

  1. Updated app.py:

    • Changed from import whisper, torch to from faster_whisper import WhisperModel
    • Updated translate_transcribe_file() to use faster-whisper API
    • Converted faster-whisper segment format to maintain compatibility with existing code
    • Preserved all language selection functionality with 50+ supported languages
  2. Updated translate.py:

    • Changed to use WhisperModel instead of whisper.load_model()
    • Updated to handle faster-whisper's tuple return format (segments, info)
    • Preserved CLI language parameter support
  3. Updated pyproject.toml:

    • Changed dependency from openai-whisper>=20250625 to faster-whisper>=1.1.0
  4. Updated Dockerfile:

    • Adopted main branch's multi-stage approach for faster-whisper model caching
    • Removed conflicting utils/get_model_url.py

Result:

  • ✅ All merge conflicts resolved
  • ✅ Language selection dropdown preserved with all 50+ languages
  • ✅ Faster performance from faster-whisper library
  • ✅ Backward compatibility maintained (Norwegian still default)
  • ✅ Changes committed and pushed to branch

The PR now incorporates both the performance improvements from main and the language selection feature, making it ready for merge!

- Updated app.py to use faster_whisper.WhisperModel instead of openai-whisper
- Converted faster_whisper segment format to dict format for compatibility
- Updated translate.py to use faster-whisper API
- Updated pyproject.toml to use faster-whisper>=1.1.0 dependency
- Updated Dockerfile to use faster-whisper model downloading approach
- Removed utils/ directory that conflicts with main branch approach
- Preserved all language selection functionality with 50+ supported languages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Francesco Frassinelli <frafra@users.noreply.github.com>
@frafra
Copy link
Contributor Author

frafra commented Aug 7, 2025

@claude rebase on main

@claude
Copy link

claude bot commented Aug 7, 2025

Claude finished @frafra's task —— View job


Tasks:

  • Check current git status and fetch latest main
  • Perform git rebase onto main branch ⚠️ Permission limitation
  • Resolve any conflicts if they arise
  • Verify rebased code works correctly
  • Push rebased branch to remote

Status Update:

I've analyzed the current state and identified that main has one new commit ahead of this branch:

  • 9305c57 Merge pull request #5 from NINAnor/faster-whisper

However, I'm unable to perform the git rebase operation due to limited bash permissions. The git rebase command is not in my approved list of git commands (I only have access to: git add, git commit, git push, git status, git diff, git log, git rm).

Recommended Action:

Since I cannot perform the rebase operation directly, you have a few options:

  1. Manual rebase: You can perform the rebase locally:

    git fetch origin main
    git rebase origin/main
    git push --force-with-lease origin claude/issue-1-20250806-1106
  2. Update my permissions: You could grant me broader bash permissions to include git rebase and git fetch commands by updating my --allowedTools.

  3. Alternative approach: Since the branch already has the conflicts resolved and is working correctly, you could consider squash-merging the PR instead of rebasing, which would achieve a similar clean history result.

The current branch is clean and up-to-date with its remote counterpart, so a rebase should be straightforward once the permissions are available.

@BenCretois
Copy link
Collaborator

Closed, this pull request is outdated

@BenCretois BenCretois closed this Aug 28, 2025
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.

Choose language to translate to

2 participants