Changes for supporting newer python/numpy#317
Open
avinashvarna wants to merge 1 commit intoreadbeyond:develfrom
Open
Changes for supporting newer python/numpy#317avinashvarna wants to merge 1 commit intoreadbeyond:develfrom
avinashvarna wants to merge 1 commit intoreadbeyond:develfrom
Conversation
|
working! thanks |
Installing Aeneas on Python 3.12+ (macOS)A simple guide for installing aeneas with Python 3.12+ support, including the fixes from PR #317. Prerequisites
Installation StepsStep 1: Clone the PR #317 Branchcd ~/Downloads # or wherever you want to install
git clone -b py312_support https://github.com/avinashvarna/aeneas.git
cd aeneasStep 2: Upgrade Python Build Toolspip install --upgrade pip setuptools packaging numpyStep 3: Set Environment Variablesexport LDFLAGS="-L/opt/homebrew/opt/espeak/lib -L/opt/homebrew/lib"
export CPPFLAGS="-I/opt/homebrew/opt/espeak/include -I/opt/homebrew/include"Step 4: Disable Festival Extension (Optional)Festival is rarely needed. To skip it and avoid compilation errors: # Backup original setup.py
cp setup.py setup.py.bak
# Comment out Festival extension
sed -i.tmp '38,54s/^/#/' setup.py
sed -i.tmp '61s/^/#/' setup.pyStep 5: Install Aeneaspip install .Step 6: Verify Installation# Move out of source directory first!
cd ~
python -m aeneas.diagnosticsYou should see: Fix Shell Encoding Warning (Optional)Add to your export PYTHONIOENCODING=UTF-8Then reload: source ~/.zshrc # or source ~/.bash_profileQuick Test# Create a test directory
mkdir -p ~/aeneas_test && cd ~/aeneas_test
# Run example
python -m aeneas.tools.execute_task --example-cewsubprocessCommon IssuesIssue: "library 'espeak' not found"Solution: Make sure environment variables are set before installing: export LDFLAGS="-L/opt/homebrew/opt/espeak/lib -L/opt/homebrew/lib"
export CPPFLAGS="-I/opt/homebrew/opt/espeak/include -I/opt/homebrew/include"
pip install .Issue: "library 'Festival' not found"Solution: Disable Festival extension (Step 4 above) - you don't need it. Issue: C extensions show "NOT AVAILABLE"Solution: You're probably in the source directory. Move to a different directory: cd ~
python -m aeneas.diagnosticsIssue: Intel Mac vs Apple SiliconFor Intel Macs, use export LDFLAGS="-L/usr/local/opt/espeak/lib -L/usr/local/lib"
export CPPFLAGS="-I/usr/local/opt/espeak/include -I/usr/local/include"Usage ExampleCreate from aeneas.executetask import ExecuteTask
from aeneas.task import Task
# Configuration
config = "task_language=eng|is_text_type=plain|os_task_file_format=srt"
# Create task
task = Task(config_string=config)
task.audio_file_path_absolute = "/path/to/audio.mp4"
task.text_file_path_absolute = "/path/to/transcript.txt"
task.sync_map_file_path_absolute = "/path/to/output.srt"
# Execute
ExecuteTask(task).execute()
task.output_sync_map_file()
print("Done!")Run with: python align.pyAlternative: Command Linepython -m aeneas.tools.execute_task \
audio.mp4 \
transcript.txt \
"task_language=eng|is_text_type=plain|os_task_file_format=srt" \
output.srtCredits
Notes
|
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
numpy.distutilsto allow installation on python >=3.12 (fixes numpy.distutils deprecated #312)pytest) on Ubuntu w/ python 3.11, 3.12 and 3.13