Skip to content

Commit a3b911c

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 88477aa + 21e827e commit a3b911c

File tree

10 files changed

+533
-11
lines changed

10 files changed

+533
-11
lines changed

.github/workflows/release.yml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-x86_64:
13+
name: Build (x86_64)
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Install base dependencies
17+
shell: bash
18+
run: |
19+
set -euo pipefail
20+
export DEBIAN_FRONTEND=noninteractive
21+
sudo apt-get update
22+
sudo apt-get install -y --no-install-recommends \
23+
ca-certificates \
24+
pkg-config \
25+
libssl-dev \
26+
build-essential \
27+
git \
28+
curl \
29+
unzip
30+
31+
- name: Check out repository
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Rust toolchain
35+
uses: dtolnay/rust-toolchain@stable
36+
37+
- name: Add Rust target
38+
run: rustup target add x86_64-unknown-linux-gnu
39+
40+
- name: Build binary
41+
run: cargo build --release --target x86_64-unknown-linux-gnu
42+
43+
- name: Package release artifact
44+
id: package
45+
shell: bash
46+
run: |
47+
set -euo pipefail
48+
binary_path="target/x86_64-unknown-linux-gnu/release/echokit_server"
49+
if [ ! -f "$binary_path" ]; then
50+
echo "Release binary not found at $binary_path" >&2
51+
exit 1
52+
fi
53+
54+
archive_name="echokit_server-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz"
55+
mkdir -p dist
56+
cp "$binary_path" dist/echokit_server
57+
chmod +x dist/echokit_server
58+
tar -C dist -czf "$archive_name" echokit_server
59+
rm dist/echokit_server
60+
61+
echo "archive=$archive_name" >> "$GITHUB_OUTPUT"
62+
63+
- name: Upload artifact
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: echokit_server-x86_64-unknown-linux-gnu
67+
path: ${{ steps.package.outputs.archive }}
68+
69+
build-aarch64:
70+
name: Build (aarch64)
71+
runs-on: ubuntu-latest
72+
container:
73+
image: debian:bookworm-slim
74+
steps:
75+
- name: Install base dependencies
76+
shell: bash
77+
run: |
78+
set -euo pipefail
79+
export DEBIAN_FRONTEND=noninteractive
80+
dpkg --add-architecture arm64
81+
apt-get update
82+
apt-get install -y --no-install-recommends \
83+
ca-certificates \
84+
pkg-config \
85+
libssl-dev \
86+
libssl-dev:arm64 \
87+
gcc-aarch64-linux-gnu \
88+
libc6-dev-arm64-cross \
89+
build-essential \
90+
git \
91+
curl \
92+
unzip
93+
94+
- name: Check out repository
95+
uses: actions/checkout@v4
96+
97+
- name: Set up Rust toolchain
98+
uses: dtolnay/rust-toolchain@stable
99+
100+
- name: Add Rust target
101+
run: rustup target add aarch64-unknown-linux-gnu
102+
103+
- name: Build binary
104+
env:
105+
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
106+
AR_aarch64_unknown_linux_gnu: aarch64-linux-gnu-ar
107+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
108+
PKG_CONFIG_ALLOW_CROSS: "1"
109+
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
110+
run: cargo build --release --target aarch64-unknown-linux-gnu
111+
112+
- name: Package release artifact
113+
id: package
114+
shell: bash
115+
run: |
116+
set -euo pipefail
117+
binary_path="target/aarch64-unknown-linux-gnu/release/echokit_server"
118+
if [ ! -f "$binary_path" ]; then
119+
echo "Release binary not found at $binary_path" >&2
120+
exit 1
121+
fi
122+
123+
archive_name="echokit_server-${{ github.ref_name }}-aarch64-unknown-linux-gnu.tar.gz"
124+
mkdir -p dist
125+
cp "$binary_path" dist/echokit_server
126+
chmod +x dist/echokit_server
127+
tar -C dist -czf "$archive_name" echokit_server
128+
rm dist/echokit_server
129+
130+
echo "archive=$archive_name" >> "$GITHUB_OUTPUT"
131+
132+
- name: Upload artifact
133+
uses: actions/upload-artifact@v4
134+
with:
135+
name: echokit_server-aarch64-unknown-linux-gnu
136+
path: ${{ steps.package.outputs.archive }}
137+
138+
release:
139+
name: Publish release
140+
runs-on: ubuntu-latest
141+
needs:
142+
- build-x86_64
143+
- build-aarch64
144+
steps:
145+
- name: Download artifacts
146+
uses: actions/download-artifact@v4
147+
with:
148+
pattern: echokit_server-*
149+
path: artifacts
150+
merge-multiple: true
151+
152+
- name: Prepare release files
153+
id: prepare
154+
shell: bash
155+
run: |
156+
set -euo pipefail
157+
mapfile -t archives < <(find artifacts -name '*.tar.gz' -type f)
158+
if [ "${#archives[@]}" -eq 0 ]; then
159+
echo "No release archives found" >&2
160+
exit 1
161+
fi
162+
{
163+
echo "files<<EOF"
164+
for archive in "${archives[@]}"; do
165+
echo "$archive"
166+
done
167+
echo "EOF"
168+
} >> "$GITHUB_OUTPUT"
169+
170+
- name: Publish GitHub release
171+
uses: softprops/action-gh-release@v1
172+
with:
173+
tag_name: ${{ github.ref_name }}
174+
name: Echokit Server ${{ github.ref_name }}
175+
files: ${{ steps.prepare.outputs.files }}
176+
env:
177+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Setup the EchoKit server
1+
# EchoKit Server
22

3-
EchoKit Server is the central component that manages communication between the EchoKit device and AI services. It can be deployed locally or connected to preset servers, allowing developers to customize LLM endpoints, plan the LLM prompt, configure speech models, and integrate additional AI features like MCP servers.
3+
EchoKit Server is the central component that manages communication between the [EchoKit device](https://echokit.dev/) and AI services. It can be deployed locally or connected to preset servers, allowing developers to customize LLM endpoints, plan the LLM prompt, configure speech models, and integrate additional AI features like MCP servers.
44

55
<br>
66
<div align="center">
@@ -11,11 +11,43 @@ EchoKit Server is the central component that manages communication between the E
1111
</div>
1212
</br>
1313

14-
You will need an EchoKit device, or create your own ESP32 device with the [EchoKit firmware](https://github.com/second-state/echokit_box).
14+
You will need an [EchoKit device](https://echokit.dev/), or create your own ESP32 device with the [EchoKit firmware](https://github.com/second-state/echokit_box).
1515

1616

17+
## Features
1718

18-
## Build
19+
EchoKit Server powers the full voice–AI interaction loop, making it easy for developers to run end-to-end speech pipelines with flexible model choices and custom integrations.
20+
21+
### ASR → LLM → TTS Pipeline
22+
23+
Seamlessly connect **ASR → LLM → TTS** for real-time, natural conversations.
24+
Each stage can be configured independently with your preferred models or APIs.
25+
26+
#### Model Compatibility
27+
28+
* **ASR (Speech Recognition):** Works with any API that’s *OpenAI-compatible*.
29+
* **LLM (Language Model):** Connect to any *OpenAI-spec* endpoint — local or cloud.
30+
* **TTS (Text-to-Speech):** Use any *OpenAI-spec* voice model for flexible deployment.
31+
* ElevenLabs (Streaming Mode)
32+
33+
### End-to-End Model Pipelines
34+
35+
Out-of-the-box support for:
36+
37+
* **Gemini** — Google’s multimodal model
38+
* **Qwen Real-Time** — Alibaba’s powerful open LLM
39+
40+
### Developer Customization
41+
42+
* Deploy **locally** or connect to **remote inference servers**
43+
* Define your own **LLM prompts** and **response workflows**
44+
* Configure **speech and voice models** for different personas or use cases
45+
* Integrate **MCP servers** for extended functionality
46+
47+
48+
## Set up the EchoKit server
49+
50+
### Build
1951

2052
```
2153
git clone https://github.com/second-state/echokit_server
@@ -27,7 +59,7 @@ Edit `config.toml` to customize the VAD, ASR, LLM, TTS services, as well as prom
2759
cargo build --release
2860
```
2961

30-
## Configure AI services
62+
### Configure AI services
3163

3264
The `config.toml` can use any combination of open-source or proprietary AI services, as long as they offer OpenAI-compatible API endpoints. Here are instructions to start open source AI servers for the EchoKit server.
3365

@@ -40,18 +72,18 @@ Alternatively, you could use Google Gemini Live services for VAD + ASR + LLM, an
4072

4173
You can also [configure MCP servers](examples/gaia/mcp/config.toml) to give the EchoKit server tool use capabilities.
4274

43-
## Configure the voice prompt
75+
### Configure the voice prompt
4476

4577
The `hello.wav` file on the server is sent to the EchoKit device when it connects. It is the voice prompt the device will say to tell the user that it is ready.
4678

47-
## Run the EchoKit server
79+
### Run the EchoKit server
4880

4981
```
5082
export RUST_LOG=debug
5183
nohup target/release/echokit_server &
5284
```
5385

54-
## Test on a web page
86+
### Test on a web page
5587

5688
Go here: https://echokit.dev/chat/
5789

@@ -61,7 +93,7 @@ Double click the local `index.html` file and open it in your browser.
6193

6294
In the web page, set the URL to your own EchoKit server address, and start chatting!
6395

64-
## Configure a new device
96+
### Configure a new device
6597

6698
Go to web page: https://echokit.dev/setup/ and use Bluetooth to connect to the `GAIA ESP332` device.
6799

@@ -77,9 +109,9 @@ Configure WiFi and server
77109

78110
![Configure Wifi](https://hackmd.io/_uploads/HJkh5ZjVee.png)
79111

80-
## Use the device
112+
### Use the device
81113

82-
**Chat:** press the `K0` button once or multiple times util the screen shows "Listening ...". You can now speak and it will answer.
114+
**Chat:** press the `K0` button once or multiple times until the screen shows "Listening ...". You can now speak and it will answer.
83115

84116
**Record:** long press the `K0` until the screen shows "Recording ...". You can now speak and the audio will be recorded on the server.
85117

0 commit comments

Comments
 (0)