Skip to content

Commit

Permalink
add speech to text model
Browse files Browse the repository at this point in the history
  • Loading branch information
samos123 committed Sep 4, 2024
1 parent 4c18013 commit 20b6898
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/kubeai/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies:
# These are instances of the Model custom resource.
- name: models
condition: models.enabled
version: 0.1.0
version: 0.1.1


keywords: ["LLM", "AI"]
Expand Down
2 changes: 1 addition & 1 deletion charts/kubeai/charts/models/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
7 changes: 7 additions & 0 deletions charts/kubeai/charts/models/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,11 @@ catalog:
url: "ollama://qwen2:0.5b"
engine: OLlama
resourceProfile: cpu:1
faster-whisper-medium-en-cpu:
enabled: false
features: ["SpeechToText"]
owner: Systran
url: "hf://Systran/faster-whisper-medium.en"
engine: FasterWhisper
resourceProfile: cpu:1

13 changes: 13 additions & 0 deletions test/quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ models:
enabled: true
nomic-embed-text-cpu:
enabled: true
faster-whisper-medium-en-cpu:
enabled: true
EOF

wait_for_pod_ready model=gemma2-2b-cpu
Expand All @@ -73,3 +75,14 @@ curl http://localhost:8000/openai/v1/completions \
-H "Content-Type: application/json" \
-d '{"model": "gemma2-2b-cpu", "prompt": "Who was the first president of the United States?", "max_tokens": 40}'

# Test the speech to text endpoint
curl -L -o kubeai.mp4 https://github.com/user-attachments/assets/711d1279-6af9-4c6c-a052-e59e7730b757
result=$(curl http://localhost:8000/openai/v1/audio/transcriptions \
-F "file=@kubeai.mp4" \
-F "language=en" | jq '.text | ascii_downcase | contains("kubernetes")')
if [ "$result" = "true" ]; then
echo "The transcript contains 'kubernetes'."
else
echo "The text does not contain 'kubernetes'."
exit 1
fi

0 comments on commit 20b6898

Please sign in to comment.