Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ jobs:
run: pnpm test

- name: Build JavaScript packages
run: pnpm build
run: |
pnpm build
pnpm check:package-install

browser:
name: Browser microphone
Expand Down
27 changes: 16 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@

Seda follows semantic versioning. Notable changes are recorded here.

## 0.3.0

- Made `SedaBrowser.prepare({ modelId })` the high-level readiness boundary.
`create()` remains a deprecated compatibility alias.
- Replaced model tiers as the primary interface with exact model ID, immutable
revision, variant, and runtime identity. Profiles remain convenience aliases.
- Moved language selection from preparation and startup to each transcription
or live stream, with fixed, prompted, automatic, and checkpoint capability
semantics.
- Added typed Python, Go, and Swift protocol clients with real Rust-sidecar
HTTP/WebSocket integration coverage in GitHub Actions.
- Declared the universal client as a peer of the browser and Node packages so
GitHub release tarballs can be installed without an unpublished npm package.

## 0.2.0

- Added `@bearlyai/seda-browser`, a serverless in-browser runtime backed by a
dedicated Worker, automatic WebGPU/WASM selection, and pinned Moonshine Tiny
model caching.
- Made `SedaBrowser.prepare({ modelId })` the high-level readiness boundary,
followed by `microphone()`, live revisions, `stop()`, `cancel()`, and
`close()`—no port, token, or audio blobs. `create()` remains a deprecated
compatibility alias.
- Kept the high-level API to `SedaBrowser.create()`, `microphone()`, live
revisions, `stop()`, `cancel()`, and `close()`—no port, token, or audio blobs.
- Extracted a runtime-neutral `TranscriptionSession` contract so native and
browser inference share capture and application code.
- Added model download/compile readiness progress, abortable initialization,
Expand All @@ -20,13 +32,6 @@ Seda follows semantic versioning. Notable changes are recorded here.
test using a checksum-verified speech fixture.
- Reworked all browser documentation around complete microphone and
Shift-to-talk flows, deployment requirements, model behavior, and error UX.
- Replaced model tiers as the primary interface with exact model ID, immutable
revision, variant, and runtime identity. Profiles remain convenience aliases.
- Moved language selection from preparation and startup to each transcription
or live stream, with fixed, prompted, automatic, and checkpoint capability
semantics.
- Added typed Python, Go, and Swift protocol clients with real Rust-sidecar
HTTP/WebSocket integration coverage in GitHub Actions.

## 0.1.1

Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.2.0"
version = "0.3.0"
edition = "2024"
rust-version = "1.90"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ GitHub release:

```sh
pnpm add \
https://github.com/bearlyai/seda/releases/download/v0.2.0/bearlyai-seda-0.2.0.tgz \
https://github.com/bearlyai/seda/releases/download/v0.2.0/bearlyai-seda-browser-0.2.0.tgz
https://github.com/bearlyai/seda/releases/download/v0.3.0/bearlyai-seda-0.3.0.tgz \
https://github.com/bearlyai/seda/releases/download/v0.3.0/bearlyai-seda-browser-0.3.0.tgz
```

Initialize the model once during application readiness:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"build:pages": "pnpm build && vite build examples/browser-demo --base /seda/ --outDir ../../dist/pages --emptyOutDir",
"check": "pnpm run check:dependency-policy && pnpm --filter @bearlyai/seda check && pnpm --filter @bearlyai/seda build && pnpm --filter @bearlyai/seda-browser check && pnpm --filter @bearlyai/seda-browser build && pnpm --filter @bearlyai/seda-node check && tsc -p tsconfig.browser.json",
"check:dependency-policy": "pnpm config list --json | node scripts/check-dependency-policy.mjs",
"check:package-install": "node scripts/check-package-install.mjs",
"test": "pnpm --recursive test",
"test:browser": "playwright test"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ the GitHub release:

```sh
pnpm add \
https://github.com/bearlyai/seda/releases/download/v0.2.0/bearlyai-seda-0.2.0.tgz \
https://github.com/bearlyai/seda/releases/download/v0.2.0/bearlyai-seda-browser-0.2.0.tgz
https://github.com/bearlyai/seda/releases/download/v0.3.0/bearlyai-seda-0.3.0.tgz \
https://github.com/bearlyai/seda/releases/download/v0.3.0/bearlyai-seda-browser-0.3.0.tgz
```

Use a normal browser bundler such as Vite, webpack, Parcel, or esbuild. The
Expand Down
7 changes: 4 additions & 3 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bearlyai/seda-browser",
"version": "0.2.0",
"version": "0.3.0",
"description": "Private, in-browser speech recognition for Seda using WebGPU or WASM",
"type": "module",
"license": "Apache-2.0",
Expand All @@ -21,10 +21,11 @@
"check": "tsc -p tsconfig.json --noEmit",
"test": "vitest run"
},
"dependencies": {
"@bearlyai/seda": "workspace:*"
"peerDependencies": {
"@bearlyai/seda": "^0.3.0"
},
"devDependencies": {
"@bearlyai/seda": "workspace:*",
"@huggingface/transformers": "3.7.6",
"@webgpu/types": "0.1.69",
"esbuild": "0.28.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/browser/src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {
} from "./types.js";
import { InferenceWorker } from "./worker-host.js";

const VERSION = "0.2.0";
const VERSION = "0.3.0";
const PROTOCOL = 1;

export class SedaBrowser {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Until npm trusted publishing is configured, install the package attached to the
GitHub release:

```sh
pnpm add https://github.com/bearlyai/seda/releases/download/v0.2.0/bearlyai-seda-0.2.0.tgz
pnpm add https://github.com/bearlyai/seda/releases/download/v0.3.0/bearlyai-seda-0.3.0.tgz
```

Start the native companion with your exact page origin:
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bearlyai/seda",
"version": "0.2.0",
"version": "0.3.0",
"description": "Typed browser and Node client for the Seda local speech service",
"type": "module",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ the GitHub release:

```sh
pnpm add \
https://github.com/bearlyai/seda/releases/download/v0.2.0/bearlyai-seda-0.2.0.tgz \
https://github.com/bearlyai/seda/releases/download/v0.2.0/bearlyai-seda-node-0.2.0.tgz
https://github.com/bearlyai/seda/releases/download/v0.3.0/bearlyai-seda-0.3.0.tgz \
https://github.com/bearlyai/seda/releases/download/v0.3.0/bearlyai-seda-node-0.3.0.tgz
```

Install the matching `seda` binary from the same release and put it on `PATH`,
Expand Down
7 changes: 5 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bearlyai/seda-node",
"version": "0.2.0",
"version": "0.3.0",
"description": "Lifecycle-managed Seda sidecar for Node and Electron",
"type": "module",
"license": "Apache-2.0",
Expand All @@ -21,10 +21,13 @@
"test": "vitest run"
},
"dependencies": {
"@bearlyai/seda": "workspace:*",
"ws": "^8.18.2"
},
"peerDependencies": {
"@bearlyai/seda": "^0.3.0"
},
"devDependencies": {
"@bearlyai/seda": "workspace:*",
"@types/node": "^24.0.3",
"@types/ws": "^8.18.1",
"typescript": "^5.8.3",
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ minimumReleaseAgeStrict: true
trustLockfile: false

overrides:
# Vite/PostCSS uses only nanoid's stable top-level API. Pin the already-aged,
# unaffected ESM release while the new 3.x security patch is quarantined.
nanoid: "5.1.16"
sharp: "0.35.3"

allowBuilds:
Expand Down
81 changes: 81 additions & 0 deletions scripts/check-package-install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { mkdtemp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { spawnSync } from "node:child_process";

const packageManager = process.env.npm_execpath;
if (!packageManager) {
throw new Error("Run this check through pnpm.");
}

const rootPackage = JSON.parse(await readFile(new URL("../package.json", import.meta.url), "utf8"));
const clientPackage = JSON.parse(await readFile(new URL("../packages/client/package.json", import.meta.url), "utf8"));
const packageManagerVersion = rootPackage.packageManager;
const packageVersion = clientPackage.version;
const directory = await mkdtemp(join(tmpdir(), "seda-package-install-"));
const packedDirectory = join(directory, "packed");

const runPnpm = (args, cwd = new URL("..", import.meta.url)) => {
const result = spawnSync(process.execPath, [packageManager, ...args], {
cwd,
encoding: "utf8",
stdio: "pipe",
});
if (result.status !== 0) {
throw new Error([result.stdout, result.stderr].filter(Boolean).join("\n"));
}
};

try {
await mkdir(packedDirectory);
for (const packageName of [
"@bearlyai/seda",
"@bearlyai/seda-browser",
"@bearlyai/seda-node",
]) {
runPnpm(["--filter", packageName, "pack", "--pack-destination", packedDirectory]);
}

const packages = ["bearlyai-seda", "bearlyai-seda-browser", "bearlyai-seda-node"];
await writeFile(
join(directory, "package.json"),
JSON.stringify(
{
name: "seda-package-install-check",
private: true,
type: "module",
packageManager: packageManagerVersion,
dependencies: Object.fromEntries(
packages.map((name) => [
name === "bearlyai-seda"
? "@bearlyai/seda"
: `@bearlyai/${name.replace("bearlyai-seda-", "seda-")}`,
`file:${join(packedDirectory, `${name}-${packageVersion}.tgz`)}`,
]),
),
},
null,
2,
),
);
await writeFile(
join(directory, "pnpm-workspace.yaml"),
"blockExoticSubdeps: true\nstrictDepBuilds: true\n",
);

runPnpm(["install"], directory);
const imported = spawnSync(
process.execPath,
[
"--input-type=module",
"--eval",
'await Promise.all([import("@bearlyai/seda"), import("@bearlyai/seda-browser"), import("@bearlyai/seda-node")]);',
],
{ cwd: directory, encoding: "utf8", stdio: "pipe" },
);
if (imported.status !== 0) {
throw new Error([imported.stdout, imported.stderr].filter(Boolean).join("\n"));
}
} finally {
await rm(directory, { recursive: true, force: true });
}
2 changes: 1 addition & 1 deletion sdks/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "bearlyai-seda"
version = "0.2.0"
version = "0.3.0"
description = "Typed Python client for the local Seda speech runtime"
readme = "README.md"
requires-python = ">=3.11"
Expand Down
2 changes: 1 addition & 1 deletion sdks/swift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ iOS 16+.
Add the package and link the `Seda` product:

```swift
.package(url: "https://github.com/bearlyai/seda.git", from: "0.2.0")
.package(url: "https://github.com/bearlyai/seda.git", from: "0.3.0")
```

On macOS, prepare and launch the helper by exact model ID:
Expand Down
Loading