Skip to content

Commit

Permalink
add speech to text
Browse files Browse the repository at this point in the history
  • Loading branch information
chsasank committed Oct 17, 2024
1 parent 39870b9 commit 2ed6d51
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/app-store/definitions/openedai-speech/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# taken from here: https://github.com/bartolli/ollama-bearer-auth/blob/cuda-env/Caddyfile
:8080 {
# Define a matcher for authorized API access
@apiAuth {
header Authorization "Bearer {env.OPENEDAI_SPEECH_API_KEY}"
}

# Proxy authorized requests
reverse_proxy @apiAuth http://localhost:8000 {
header_up Host {http.reverse_proxy.upstream.hostport}
}

# Define a matcher for unauthorized access
@unauthorized {
not {
header Authorization "Bearer {env.OPENEDAI_SPEECH_API_KEY}"
}
}

# Respond to unauthorized access
respond @unauthorized "Unauthorized" 401 {
close
}
}
22 changes: 22 additions & 0 deletions src/app-store/definitions/openedai-speech/openedai-speech.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(define-app
(version "0.18.2")
(ports 8080)
(url "https://github.com/matatonic/openedai-speech")
(containers
(container
(name "server")
(image "ghcr.io/matatonic/openedai-speech:0.18.2")
(environment
("TTS_HOME" "voices")
("HF_HOME" "voices"))
(volumes
("voices" "/app/voices")
("config" "/app/config"))
(additional-flags "--device nvidia.com/gpu=all"))
(container
(name "caddy")
(image "docker.io/caddy:2.8.4-alpine")
(environment
("OPENEDAI_SPEECH_API_KEY" ,(gen-password)))
(volumes
("Caddyfile" "/etc/caddy/Caddyfile")))))

0 comments on commit 2ed6d51

Please sign in to comment.