Skip to content

Commit

Permalink
Merge branch 'main' into polish-diarization
Browse files Browse the repository at this point in the history
  • Loading branch information
rishikanthc authored Oct 16, 2024
2 parents 9e8fb53 + b432e50 commit bcd47fc
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 4 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/github-actions-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: ci

on:
push:

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

# Cache Node.js dependencies
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache compiled binaries
uses: actions/cache@v3
with:
path: |
/usr/local/bin/
/usr/local/share/man/man1/
/usr/local/share/man/man5/
key: ${{ runner.os }}-build-${{ hashFiles('Dockerfile') }}

- name: Build and push to GHCR
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/rishikanthc/scriberr:nightly
cache-from: type=registry,ref=ghcr.io/rishikanthc/scriberr:nightly
cache-to: type=registry,ref=ghcr.io/rishikanthc/scriberr:nightly,mode=max

- name: Push image to GHCR
run: |
docker buildx imagetools create \
ghcr.io/rishikanthc/scriberr:nightly \
--tag ghcr.io/rishikanthc/scriberr:nightly
4 changes: 0 additions & 4 deletions src/lib/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,10 @@ const worker = new Worker(
const audiowaveformCmd = `audiowaveform -i ${ffmpegPath} -o ${audioPath}.json`;
await execCommandWithLogging(audiowaveformCmd, job);
await job.log(`Audiowaveform for ${recordId} generated`);


const settingsRecords = await pb.collection('settings').getList(1, 1);
const settings = settingsRecords.items[0];


// Execute whisper.cpp command and log output
const transcriptdir = path.resolve(env.SCRIBO_FILES, 'transcripts', `${recordId}`);
const transcriptPath= path.resolve(env.SCRIBO_FILES, 'transcripts', `${recordId}`, `${recordId}`);
Expand Down Expand Up @@ -209,7 +207,6 @@ const worker = new Worker(
let transcriptJson = JSON.parse(transcript);
console.log(transcriptJson);


const audioPeaks = fs.readFileSync(`${audioPath}.json`, 'utf-8');
let upd;

Expand Down Expand Up @@ -338,7 +335,6 @@ function preprocessWordTimestamps(wordTimestamps) {
// nextWord.timestamps.from = word.timestamps.from;
// }
console.log('deleting char')

} else if (text.length === 1 && (text === 'a' || text === 'I' || text === 'i')) {
// Keep "a" as a separate word
cleanedTimestamps.push(word);
Expand Down

0 comments on commit bcd47fc

Please sign in to comment.