Skip to content

Commit 0269982

Browse files
committed
Merge branch 'main' into new-examples
Signed-off-by: Michael Yuan <michael@secondstate.io>
2 parents 20eb6b2 + b962973 commit 0269982

27 files changed

Lines changed: 306 additions & 59 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ jobs:
8989
build-essential \
9090
git \
9191
curl \
92-
unzip
92+
unzip \
93+
cmake
9394
9495
- name: Check out repository
9596
uses: actions/checkout@v4

Cargo.lock

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "echokit_server"
3-
version = "0.2.0"
3+
version = "0.2.5"
44
edition = "2021"
55

66
[dependencies]
@@ -23,8 +23,11 @@ axum-extra = { version = "0.10.0", features = ["typed-header"] }
2323
tokio = { version = "1", features = ["full"] }
2424

2525
reqwest = { version = "0.12", features = ["multipart", "json", "stream"] }
26+
2627
hound = "3.5.1"
2728
wav_io = "0.1.15"
29+
opus = "0.3.0"
30+
2831
rand = "0.9.0"
2932
uuid = { version = "1.14", features = [
3033
"v4", # Lets you generate random UUIDs

config.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ speaker = "speaker2"
2727
# vad_realtime_url = "ws://localhost:9093/v1/audio/realtime_vad"
2828

2929
[asr]
30+
platform = "whisper"
3031
url = "https://whisper.gaia.domains/v1/audio/transcriptions"
3132
lang = "auto"
3233
prompt = "Hello\n你好\n(noise)\n(bgm)\n(silence)\n"
@@ -39,8 +40,9 @@ vad_url = "http://localhost:9093/v1/audio/vad"
3940
# history = 1
4041

4142
[llm]
42-
prompts_url = "http://localhost:8001/default_dynamic_prompts.json"
43-
llm_chat_url = "https://0xb2962131564bc854ece7b0f7c8c9a8345847abfb.gaia.domains/v1/chat/completions"
43+
platform = "chat"
44+
url = "https://0xb2962131564bc854ece7b0f7c8c9a8345847abfb.gaia.domains/v1/chat/completions"
45+
#prompts_url = "http://localhost:8001/default_dynamic_prompts.json"
4446
api_key = "gaia-1234"
4547
history = 5
4648

docker/server-vad/config.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ addr = "0.0.0.0:8080"
22
hello_wav = "hello.wav"
33

44
[tts]
5-
platform = "Groq"
5+
platform = "openai"
6+
url = "https://api.groq.com/openai/v1/audio/speech"
67
model = "playai-tts"
78
api_key = "gsk_ABCD"
89
voice = "Fritz-PlayAI"
910

1011
[asr]
12+
platform = "openai"
1113
url = "https://api.groq.com/openai/v1/audio/transcriptions"
1214
api_key = "gsk_ABCD"
1315
model = "whisper-large-v3"
@@ -19,7 +21,8 @@ vad_url = "http://localhost:8000/v1/audio/vad"
1921
# vad_realtime_url = "ws://localhost:8000/v1/audio/realtime_vad"
2022

2123
[llm]
22-
llm_chat_url = "https://api.groq.com/openai/v1/chat/completions"
24+
platform = "openai_chat"
25+
url = "https://api.groq.com/openai/v1/chat/completions"
2326
api_key = "gsk_ABCD"
2427
model = "openai/gpt-oss-20b"
2528
history = 5

docker/server/config.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@ addr = "0.0.0.0:8080"
22
hello_wav = "hello.wav"
33

44
[tts]
5-
platform = "Groq"
5+
platform = "openai"
6+
url = "https://api.groq.com/openai/v1/audio/speech"
67
model = "playai-tts"
78
api_key = "gsk_ABCD"
89
voice = "Fritz-PlayAI"
910

1011
[asr]
12+
platform = "openai"
1113
url = "https://api.groq.com/openai/v1/audio/transcriptions"
1214
api_key = "gsk_ABCD"
1315
model = "whisper-large-v3"
1416
lang = "en"
1517
prompt = "Hello\n你好\n(noise)\n(bgm)\n(silence)\n"
1618

1719
[llm]
18-
llm_chat_url = "https://api.groq.com/openai/v1/chat/completions"
20+
platform = "openai_chat"
21+
url = "https://api.groq.com/openai/v1/chat/completions"
1922
api_key = "gsk_ABCD"
2023
model = "openai/gpt-oss-20b"
2124
history = 5

examples/alibailian/config.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ hello_wav = "hello.wav"
44
# Get your API key from https://bailian.console.aliyun.com/
55

66
[asr]
7+
platform = "paraformer_v2"
78
paraformer_token = "sk-API-KEY"
89

10+
911
[tts]
10-
platform = "CosyVoice"
12+
platform = "cosyvoice"
1113
token = "sk-API-KEY"
1214
speaker = "longhua_v2"
1315

1416
# Supported platforms: cosyvoice-v2 (default) and cosyvoice-v1
1517
# Get speaker list from https://help.aliyun.com/zh/model-studio/cosyvoice-java-sdk#722dd7ca66a6x
1618

1719
[llm]
18-
llm_chat_url = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
20+
platform = "openai_chat"
21+
url = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"
1922
api_key = "sk-API-KEY"
2023
model = "qwen-plus"
2124
history = 5

examples/gaia/config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ speaker = "cooper"
99

1010
# Requires a local Whisper API server at port 9092: https://llamaedge.com/docs/ai-models/speech-to-text/quick-start-whisper
1111
[asr]
12+
platform = "whisper"
1213
url = "http://localhost:9092/v1/audio/transcriptions"
1314
lang = "auto"
1415
# Requires a local Silero VAD server at port 9093: https://github.com/second-state/silero_vad_server
@@ -17,7 +18,8 @@ vad_url = "http://localhost:9093/v1/audio/vad"
1718

1819
# Requires a local LlamaEdge API server at port 9091: https://llamaedge.com/docs/ai-models/llm/quick-start-llm
1920
[llm]
20-
llm_chat_url = "http://localhost:9091/v1/chat/completions"
21+
platform = "chat"
22+
url = "http://localhost:9091/v1/chat/completions"
2123
api_key = "Bearer gaia-1234"
2224
model = "default"
2325
history = 5

examples/gaia/english_teacher/config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ url = "http://localhost:9094/v1/audio/stream_speech"
77
speaker = "cooper"
88

99
[asr]
10+
platform = "whisper"
1011
url = "http://localhost:9092/v1/audio/transcriptions"
1112
lang = "auto"
1213
# vad_url = "http://localhost:9093/v1/audio/vad"
1314
vad_realtime_url = "ws://localhost:9093/v1/audio/realtime_vad"
1415

1516
[llm]
16-
llm_chat_url = "http://localhost:9091/v1/chat/completions"
17+
platform = "chat"
18+
url = "http://localhost:9091/v1/chat/completions"
1719
api_key = "Bearer gaia-1234"
1820
history = 5
1921

examples/gaia/oppenheimer/config.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ url = "http://localhost:9094/v1/audio/stream_speech"
77
speaker = "cooper"
88

99
[asr]
10+
platform = "whisper"
1011
url = "http://localhost:9092/v1/audio/transcriptions"
1112
lang = "auto"
1213
# vad_url = "http://localhost:9093/v1/audio/vad"
1314
vad_realtime_url = "ws://localhost:9093/v1/audio/realtime_vad"
1415

1516
[llm]
16-
llm_chat_url = "http://localhost:9091/v1/chat/completions"
17+
platform = "chat"
18+
url = "http://localhost:9091/v1/chat/completions"
1719
api_key = "Bearer gaia-1234"
1820
history = 5
1921

0 commit comments

Comments
 (0)