Skip to content

Commit

Permalink
remove unused dep.s
Browse files Browse the repository at this point in the history
  • Loading branch information
Changochen committed Jun 7, 2024
1 parent dba93f4 commit 4e0c236
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: Cache virtualenv
uses: actions/cache@v4
with:
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('requirements.txt') }}
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('pyproject.toml') }}
path: .venv

- name: Cache Primes
- name: Cache TTS
id: cache-tts
uses: actions/cache@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ replace_dict
test.py
.env
config.yaml
config2.yaml
11 changes: 1 addition & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@ name = "slide-to-video"
version = "0.1.0"
description = "Generate video from slides."
authors = [
{ name = "GTISC", email = "ne0@gatech.com" }
{ name = "Yongheng Chen", email = "changochen1@gmail.com" }
]
dependencies = [
"pillow>=10.3.0",
"pdf2image>=1.17.0",
"moviepy>=1.0.3",
"pydub>=0.25.1",
"opencv-python>=4.9.0.80",
"tts>=0.22.0",
"srt>=3.5.3",
"ruff>=0.3.7",
"num2words>=0.5.13",
"inflect>=7.2.0",
"requests>=2.32.2",
"python-dotenv>=1.0.1",
"pymupdf>=1.24.4",
"ffmpeg-python>=0.2.0",
"python-docx>=1.1.2",
Expand All @@ -28,7 +20,6 @@ requires-python = ">= 3.8"

[project.scripts]
slide-to-video = 'script:main'
dataset-generate = 'script:dataset'

[build-system]
requires = ["hatchling"]
Expand Down
6 changes: 2 additions & 4 deletions src/slide_to_video/tts_engine/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

class LocalTTSEngine(TTSEngine):
def __init__(self, config: dict):
for a in config:
print(a)
super().__init__(**config)
must_have_keys = ["voice_sample_path"]
must_have_keys = ["voice"]
for key in must_have_keys:
if key not in config:
raise ValueError(f"Missing required key: {key}")
self.tts = None
self.voice_sample_path = config["voice_sample_path"]
self.voice_sample_path = config["voice"]

def synthesize(self, text: str, output_path: str, format: str = "wav"):
print(f"Generating audio file for text: {text} at speed {self.speed}")
Expand Down

0 comments on commit 4e0c236

Please sign in to comment.