-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from cubxxw/feat/design-ws
feat: add system design ws"
- Loading branch information
Showing
56 changed files
with
3,488 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
# MinIO 配置 | ||
MINIO_ENDPOINT=play.min.io | ||
MINIO_ACCESS_KEY=youraccesskey | ||
MINIO_SECRET_KEY=yoursecretkey | ||
MINIO_USE_SSL=false | ||
VOICEFLOW_MINIO_ENDPOINT='localhost:9000' # MinIO 服务地址 | ||
VOICEFLOW_MINIO_ACCESS_KEY='minioadmin' # MinIO 访问密钥 | ||
VOICEFLOW_MINIO_SECRET_KEY='minioadmin' # MinIO 密钥 | ||
|
||
# Azure 配置 | ||
AZURE_STT_KEY=yourazuresttkey | ||
AZURE_TTS_KEY=yourazurettskey | ||
VOICEFLOW_AZURE_STT_KEY='your_azure_stt_key' # Azure 语音转文本密钥 | ||
VOICEFLOW_AZURE_TTS_KEY='your_azure_tts_key' # Azure 文本转语音密钥 | ||
VOICEFLOW_AZURE_REGION='eastus' # Azure 服务区域 | ||
|
||
# Google 配置 | ||
GOOGLE_STT_KEY=yourgooglesttkey | ||
GOOGLE_TTS_KEY=yourgooglettskey | ||
VOICEFLOW_GOOGLE_STT_KEY='your_google_stt_key' # Google 语音转文本密钥 | ||
VOICEFLOW_GOOGLE_TTS_KEY='your_google_tts_key' # Google 文本转语音密钥 | ||
|
||
# OpenAI 配置 | ||
OPENAI_API_KEY=youropenaiapikey | ||
VOICEFLOW_OPENAI_API_KEY='your_openai_api_key' # OpenAI API 密钥 | ||
|
||
# AssemblyAI 配置 | ||
VOICEFLOW_ASSEMBLYAI_API_KEY='your_assemblyai_api_key' # AssemblyAI API 密钥 | ||
|
||
# 语音服务端口配置 | ||
VOICEFLOW_SERVER_PORT=18080 # VoiceFlow 服务端口 | ||
|
||
# VOLCENGINE 配置 | ||
VOICEFLOW_VOLCENGINE_ACCESS_KEY='' | ||
VOICEFLOW_VOLCENGINE_APP_KEY='' | ||
VOICEFLOW_VOLCENGINE_WS_URL='wss://openspeech.bytedance.com/api/v3/sauc/bigmode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: Docker Build and Push | ||
|
||
on: | ||
schedule: | ||
- cron: '30 2 * * *' | ||
push: | ||
branches: | ||
- main | ||
- release-* | ||
tags: | ||
- 'v*.*.*' # 例如 v1.0.0, v2.1.3 | ||
- 'v*.*.*-*' # 例如 v1.0.0-beta.1 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
steps: | ||
# 1. 检出代码 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # 确保获取所有标签 | ||
|
||
# 2. 设置 Docker Buildx | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v4 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
# 3. 登录 Docker Hub | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
# 4. 登录阿里云容器注册表 | ||
- name: Log in to AliYun Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: registry.cn-hangzhou.aliyuncs.com | ||
username: ${{ secrets.ALIREGISTRY_USERNAME }} | ||
password: ${{ secrets.ALIREGISTRY_TOKEN }} | ||
|
||
# 5. 登录 GitHub Container Registry | ||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# 6. 获取 Docker Metadata | ||
- name: Get Docker metadata | ||
id: metadata | ||
uses: docker/[email protected] | ||
with: | ||
images: | | ||
docker.io/telepace/voiceflow | ||
registry.cn-hangzhou.aliyuncs.com/telepace/voiceflow | ||
ghcr.io/telepace/voiceflow | ||
tags: | | ||
type=ref,event=tag | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern=v{{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}} | ||
type=sha | ||
# 7. 构建并推送 Docker 镜像 | ||
- name: Build and push Docker image for voiceflow | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./build/images/voiceflow/Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta1.outputs.tags }} | ||
labels: ${{ steps.meta1.outputs.labels }} | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache | ||
|
||
# 8. 可选:安全扫描(例如 Trivy) | ||
- name: Scan Docker image for vulnerabilities | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: telepace/voiceflow:${{ steps.metadata.outputs.version }} | ||
format: 'table' | ||
exit-code: '0' | ||
|
||
# 9. 清理未使用的 Docker 镜像 | ||
- name: Clean up Docker | ||
run: docker system prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Go Typecheck Workflow Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
comment-language-detector: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Code Typecheck Detector | ||
uses: kubecub/typecheck@main |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ jobs: | |
|
||
- name: Test build artifacts | ||
run: | | ||
# Add your tests here to check the build artifacts | ||
make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.