Skip to content

Instantly share code, notes, and snippets.

View ilippert's full-sized avatar

Ingmar Lippert ilippert

View GitHub Profile
@jdittrich
jdittrich / test_transcript.py
Last active April 7, 2022 12:53
Vosk Speech API modified test_simple.py: instead of returning a JSON it returns lines of text: MM:SS,texttexttext # so you can use them in a transcript or for close captions
#!/usr/bin/env python3
# based on https://github.com/alphacep/vosk-api/blob/master/python/example/test_simple.py
# by alphacep under Apache 2.0
# modifications by Jan D.
# instead of returning a JSON it returns lines of text: MM:SS,texttexttext
# so you can use them in a transcript or for close captions
# (for the code below to work you need python 3 and pipenv installed. If you do not have pipenv, do
# $ pip install --user pipenv
#
# The lines that start with $ mean that the text of the line after the $ is put in the terminal and executed (press Enter).
@lemiorhan
lemiorhan / post-receive
Last active February 8, 2023 10:06
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then