https://github.com/zkhan93/transcriptr
Audio Transcription Service
https://github.com/zkhan93/transcriptr
Last synced: over 1 year ago
JSON representation
Audio Transcription Service
- Host: GitHub
- URL: https://github.com/zkhan93/transcriptr
- Owner: zkhan93
- Created: 2024-07-31T04:53:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-31T07:34:10.000Z (about 2 years ago)
- Last Synced: 2024-08-01T06:53:59.572Z (about 2 years ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Audio Transcription Service
This project sets up an audio recording service on a Raspberry Pi using `arecord`. The service records audio in specified segments and stores the files in a specified directory. It is configured to run as a systemd service for automatic management.
## Components
- `record.sh`: A Bash script that continuously records audio in specified segments and saves the recordings in a specified directory.
- `transcriptr.service`: A systemd service file that manages the audio transcription service, ensuring it runs continuously and restarts automatically if it fails.
## Setup Instructions
### Step 1: Prepare the Recording Script
1. Create the `record.sh` script and make it executable:
```bash
sudo nano /pi/home/transcriptr/record.sh
sudo chmod +x /pi/home/transcriptr/record.sh
```
2. Copy the contents of `record.sh` into the file and save it.
### Step 2: Configure the Systemd Service
1. Create the systemd service file:
```bash
sudo nano /etc/systemd/system/transcriptr.service
```
2. Copy the contents of `transcriptr.service` into the file and save it.
### Step 3: Enable and Start the Service
1. Reload the systemd manager configuration:
```bash
sudo systemctl daemon-reload
```
2. Enable the service to start on boot:
```bash
sudo systemctl enable transcriptr.service
```
3. Start the service:
```bash
sudo systemctl start transcriptr.service
```
### Step 4: Verify the Service
Check the status of the service to ensure it is running correctly:
```bash
sudo systemctl status transcriptr.service
```
## Usage
The `record.sh` script takes two arguments:
- `-d DIRECTORY`: Directory to place the recorded files.
- `-t DURATION`: Duration of each segment in seconds.
The `transcriptr.service` file is configured to run `record.sh` with the desired arguments. Modify the `ExecStart` line in `transcriptr.service` if you need to change these parameters.
## Logging
Logs for the service can be viewed using the `journalctl` command:
```bash
sudo journalctl -u transcriptr.service
```
## License
This project is licensed under the MIT License.