Skip to content

Add support for Odia language subtitles#1

Open
Supan-Roy wants to merge 2 commits into
hoichoi-opensource:mainfrom
Supan-Roy:feature/odia-subtitle-support
Open

Add support for Odia language subtitles#1
Supan-Roy wants to merge 2 commits into
hoichoi-opensource:mainfrom
Supan-Roy:feature/odia-subtitle-support

Conversation

@Supan-Roy

@Supan-Roy Supan-Roy commented Jun 8, 2026

Copy link
Copy Markdown

Pull Request

📝 Description

This PR introduces support for generating subtitles in the Odia language by adding the ori.yaml configuration file. This file contains a structured system prompt that instructs the subtitle generator to accurately interpret audio contexts (across English, Hindi, and Bengali) and translate them into natural Odia script while adhering strictly to SRT timestamp formatting constraints.

Additionally, the README.md has been updated to document this new language option.

🔗 Related Issue

None

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Configuration/Infrastructure change
  • 🎨 Code style/formatting change
  • ♻️ Refactoring (no functional changes)

🧪 Testing

  • Tested locally with Docker
  • Tested with sample video files
  • Health checks pass
  • No breaking changes in existing functionality

📋 Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

📄 Additional Notes

The implementation introduces a new configuration file ori.yaml containing structured LLM system prompts specifically optimized for Odia translation and SRT generation. This establishes standard instructions for cross-lingual understanding (English/Hindi/Bengali to Odia) while strictly maintaining SRT format constraints and natural linguistic expressions.

Summary by CodeRabbit

  • New Features
    • Added support for the Odia language, enabling subtitle generation and translation from English, Hindi, and Bengali audio.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds Odia language support to the subtitle generation system. The README is updated to document Odia as a newly supported Indian language using AI transcription/translation. A new configuration file provides the prompt template that instructs the system to generate Odia-script SRT subtitles by translating from English, Hindi, or Bengali audio sources.

Changes

Odia Language Support

Layer / File(s) Summary
Odia language support documentation and configuration
README.md, config/prompts/ori.yaml
README Supported Languages table lists Odia (ori) with AI transcription/translation. New config/prompts/ori.yaml file defines the Odia subtitle-generation prompt: translates audio sources into Odia, outputs SRT-formatted subtitles with proper timestamps and synchronization, uses natural Odia phrasing, and returns only SRT content.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately describes the main change: adding Odia language support for subtitle generation. It is clear, concise, and reflects the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config/prompts/ori.yaml`:
- Line 5: The ori prompt currently restricts source languages to
English/Hindi/Bengali so there is no Odia→Odia transcription path; either
broaden the existing 'ori' prompt to allow Odia as a source (remove the "First
understand the audio in English/Hindi/Bengali" restriction) or add a new
direct-transcription prompt named 'ori_direct' and update the configuration that
assigns method: "translate" for 'ori' to reference 'ori_direct' for
transcription cases; also update ConfigManager.get_prompt to handle 'ori' like
the existing 'hin' special-case so the new prompt is selected, and revise the
README to accurately describe whether 'ori' supports Odia direct transcription
or only EN/HI/BN→Odia translation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b46fbbdd-b74e-4713-bf42-a2db808e9cde

📥 Commits

Reviewing files that changed from the base of the PR and between b5a397e and 93535e9.

📒 Files selected for processing (2)
  • README.md
  • config/prompts/ori.yaml

Comment thread config/prompts/ori.yaml
Generate Odia subtitles by translating from the audio content.

INSTRUCTIONS:
- First understand the audio in English/Hindi/Bengali

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Compare prompt patterns across language configurations to verify consistency

# Check if other Indian language prompts also limit source languages or support transcription
fd -e yaml . config/prompts/ --exec cat {} \; --exec echo "--- File: {} ---"

Repository: hoichoi-opensource/video-subtitle-generator

Length of output: 20104


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Look for the README/docs reference to "transcription/translation"
rg -n --hidden --glob '!**/node_modules/**' -S "transcription/translation|transcription|translation" README.md . || true

# Also list any docs mentioning language support/source languages
rg -n --hidden --glob '!**/node_modules/**' -S "English/Hindi/Bengali|source language|source languages" . || true

Repository: hoichoi-opensource/video-subtitle-generator

Length of output: 30696


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find how prompts are chosen and whether "translation method" implies transcription of arbitrary source languages
rg -n "ConfigManager|get_prompt|prompts/|translation method|simple_transcription|fallback_handler|language_selector|source.*auto" src config || true

# Show the core selection logic
echo "----- src/language_selector.py (relevant section) -----"
sed -n '1,220p' src/language_selector.py

echo "----- src/fallback_handler.py (relevant section) -----"
sed -n '1,220p' src/fallback_handler.py

echo "----- src/ai_generator.py (relevant selection/flow) -----"
# Pull only the likely region around method attempts
rg -n "Trying translation method|Translation method:|simple_transcription|Using translation method result|method" -n src/ai_generator.py
sed -n '300,520p' src/ai_generator.py

# Inspect how precision validator/translation quality uses "source language" vs "original text"
echo "----- src/precision_validator.py (source/language handling around translation quality) -----"
sed -n '500,700p' src/precision_validator.py

Repository: hoichoi-opensource/video-subtitle-generator

Length of output: 37690


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# List prompt yaml files
echo "=== config/prompts/*.yaml ==="
fd -e yaml config/prompts --exec sh -c 'echo "{}"' \; | sort

echo "=== Prompt files related to ori ==="
fd -e yaml config/prompts --exec sh -c '
p="{}"
case "$p" in
  *ori*.yaml) echo "$p" ;;
esac
' \; | sort

# Inspect ConfigManager.get_prompt naming/method resolution
echo "=== src/config_manager.py (get_prompt) ==="
sed -n '1,220p' src/config_manager.py

# Inspect available languages/methods for ori in config/config.yaml
echo "=== config/config.yaml (languages/methods) ==="
rg -n "languages:|ori:|method:|default:" -n config/config.yaml
sed -n '1,140p' config/config.yaml

# Also search for prompt naming conventions in ConfigManager usage
echo "=== Search for get_prompt( in src ==="
rg -n "get_prompt\(" src || true

Repository: hoichoi-opensource/video-subtitle-generator

Length of output: 497


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== config/prompts/*.yaml ==="
fd -e yaml . --full-path config/prompts --exec echo {} \; | sort

echo "=== Prompt files related to ori ==="
fd -e yaml . --full-path config/prompts --exec sh -c 'p="$0"; case "$p" in *ori*.yaml) echo "$p";; esac' {} \; | sort

echo "=== src/config_manager.py (get_prompt) ==="
sed -n '1,240p' src/config_manager.py

echo "=== config/config.yaml (languages/methods section) ==="
sed -n '1,120p' config/config.yaml

echo "=== Search get_prompt( usage ==="
rg -n "get_prompt\(" src || true

echo "=== Search for prompt method keys (direct/translate) in prompt files ==="
for f in $(fd -e yaml . --full-path config/prompts --exec echo {} \; | sort); do
  if rg -n "direct|translate" "$f" >/dev/null 2>&1; then
    echo "---- $f ----"
    rg -n "direct|translate" "$f" | head -n 50
  fi
done

Repository: hoichoi-opensource/video-subtitle-generator

Length of output: 12677


Fix README/prompt mismatch: ori prompt restricts source languages to EN/HI/BN (so Odia-audio “transcription” isn’t actually covered).

  • config/prompts/ori.yaml instructs the model to “First understand the audio in English/Hindi/Bengali” before translating to Odia; this same constraint is used by the other method: translate language prompts.
  • config/config.yaml configures ori with method: "translate" and there is no config/prompts/ori_direct.yaml (and ConfigManager.get_prompt only special-cases hin), so there’s no dedicated “Odia audio → Odia subtitles” transcription prompt path.
  • README calling ori “AI transcription/translation” doesn’t match the current prompt/config behavior; either broaden ori to allow Odia as a source language / add a direct-transcription prompt for ori, or update README to state translation-only from EN/HI/BN for non-core languages.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/prompts/ori.yaml` at line 5, The ori prompt currently restricts source
languages to English/Hindi/Bengali so there is no Odia→Odia transcription path;
either broaden the existing 'ori' prompt to allow Odia as a source (remove the
"First understand the audio in English/Hindi/Bengali" restriction) or add a new
direct-transcription prompt named 'ori_direct' and update the configuration that
assigns method: "translate" for 'ori' to reference 'ori_direct' for
transcription cases; also update ConfigManager.get_prompt to handle 'ori' like
the existing 'hin' special-case so the new prompt is selected, and revise the
README to accurately describe whether 'ori' supports Odia direct transcription
or only EN/HI/BN→Odia translation.

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