Skip to content

Commit

Permalink
Merge pull request #9 from kanjieater/ym-algo
Browse files Browse the repository at this point in the history
Ascending to alignment perfection
  • Loading branch information
kanjieater authored May 18, 2024
2 parents cc329dc + c5f0b5e commit 54b5a5f
Show file tree
Hide file tree
Showing 40 changed files with 2,129 additions and 666 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.env
__pycache__/
build/
.vscode/
*.egg-info

SyncCache/

mapping.json
sub.json
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.env
__pycache__/
.vscode/
build/
*.egg-info

SyncCache/

mapping.json
sub.json
sub.json
4 changes: 2 additions & 2 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ats
3.9.9
subplz
3.11.2
48 changes: 39 additions & 9 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,54 @@
{
"version": "0.2.0",
"configurations": [






{
"name": "Python Debugger: Module",
"type": "debugpy",
"request": "launch",
"module": "subplz",
"args": [
"sync",
"-d",
"/mnt/d/sync/変な家",
// "--audio",
// "/mnt/d/sync/変な家/変な家.m4b",
// "--text",
// "/mnt/d/sync/変な家/変な家.epub",
],
},

{
"name": "Python: align vtt",
"type": "python",
"request": "launch",
"program": "align_vtt_v2.py",
"args": ["/mnt/d/sync/medium霊媒探偵城塚翡翠/script.txt.split.txt", "/mnt/d/sync/medium霊媒探偵城塚翡翠/timings.vtt", "/mnt/d/sync/medium霊媒探偵城塚翡翠/matched.vtt"],
"args": [
"/mnt/d/sync/medium霊媒探偵城塚翡翠/script.txt.split.txt",
"/mnt/d/sync/medium霊媒探偵城塚翡翠/timings.vtt",
"/mnt/d/sync/medium霊媒探偵城塚翡翠/matched.vtt"
],
"console": "integratedTerminal",
"justMyCode": true,
"host": "127.0.0.1"
},
{
"name": "Python: ym",
"type": "python",
"request": "launch",
"program": "./subplz/__main__.py",
"args": [
"-d",
"/mnt/d/sync/変な家",
"--audio",
"/mnt/d/sync/変な家/変な家.m4b",
"--text",
"/mnt/d/sync/変な家/変な家.epub",
"--faster-whisper"
],
"console": "integratedTerminal",
"justMyCode": true,
"host": "127.0.0.1"
},


{
"name": "Python:Gen",
Expand Down Expand Up @@ -53,4 +83,4 @@
"host": "127.0.0.1"
}
]
}
}
8 changes: 5 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"[python]": {
"editor.insertSpaces": true,
"editor.tabSize": 4
}
}
"editor.tabSize": 4,
"editor.defaultFormatter": "ms-python.black-formatter",
},
"editor.defaultFoldingRangeProvider": null
}
40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Use the LinuxServer.io base image
FROM ghcr.io/linuxserver/faster-whisper:gpu

# Set environment variables
ENV PUID=1000 \
PGID=1000 \
TZ=Etc/UTC \
WHISPER_MODEL=tiny-int8 \
WHISPER_BEAM=1 \
WHISPER_LANG=ja

# Install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
ffmpeg \
libportaudio2 \
&& rm -rf /var/lib/apt/lists/*

#remove when we get abts updated w/ a pyproject.toml
COPY /home/ke/code/AudiobookTextSync /tmp/AudiobookTextSync

COPY pyproject.toml /tmp/
RUN pip install --no-cache-dir /tmp/

# Copy application files
COPY . /app

# Set work directory
WORKDIR /app

# # Expose port for Wyoming connection
# EXPOSE 10300

# Healthcheck to ensure container is running
HEALTHCHECK --interval=30s --timeout=10s CMD nc -z localhost 10300 || exit 1

# Start the application
# ENTRYPOINT ["python", "./src/main.py"]
# CMD ["--help"]
Loading

0 comments on commit 54b5a5f

Please sign in to comment.