File size: 1,910 Bytes
7897caf
 
 
 
 
 
 
 
 
 
 
 
2438778
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
title: Aeneas
emoji: πŸš€
colorFrom: green
colorTo: green
sdk: docker
pinned: false
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference


# subtitle-sync
subtitle-sync repository contains simple app with for subtitle file generation from text and audio.


### Project Setup

#### Clone the Repository


```bash
git clone https://github.com/rizwanahmad8311/subtitle-sync.git
cd subtitle-sync
```

The required version of python for this project is 3.10.Make sure you have the correct version.
### Set up Virtual Environment

#### Install Virtualenv

```bash
sudo apt update
sudo apt install python3-venv
```

##### Create Virtual Environment

```bash
python3 -m venv venv
```

##### Activate Virtual Environment

```bash
source venv/bin/activate
```


#### Install Requirements

```bash
pip install -r requirements.txt
```

#### Running the Server

```bash
python app.py
```
### Subtitle Sync APP
You can now access the app:

* [Subtitle Sync APP](http://127.0.0.1:7860/)

## Dockerized Server

### Usage

#### Build the Docker Image


Open cmd/shell and change location where `Dockerfile` is located and run the following command. This may take a while (6-10 minutes) depending upon internet speed.

```shell
docker build -t subtitle-sync .
```

* `-t subtitle-sync` names your image `subtitle-sync`
* `.` means Dockerfile is in the current directory

#### Run the Docker Container

```shell
docker run -p 7860:7860 subtitle-sync
```

#### Run in Detached Mode

```shell
docker run -d -p 7860:7860 --name subtitle-container subtitle-sync
```

Run the following command to check the running containers

```shell
docker ps
```

#### Environment Variables

* `-d` - This command starts the container in the background, allowing you to use your terminal freely.

### Subtitle Sync APP
You can now access the app:

* [Subtitle Sync APP](http://127.0.0.1:7860/)