Skip to content

Commit aeef6af

Browse files
authored
Merge pull request #11 from ofspectrum/sync-sdk-v1.4.0
Sync SDK v1.4.0 from neo
2 parents 0021cbd + 355b28b commit aeef6af

35 files changed

Lines changed: 6680 additions & 64 deletions

‎.env.example‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ELEVENLABS_API_KEY=
2+
GEMINI_API_KEY=
3+
GOOGLE_CLOUD_TTS_API_KEY=
4+
OPENAI_API_KEY=
5+
AZURE_SPEECH_KEY=
6+
AZURE_SPEECH_REGION=
7+
AZURE_SPEECH_ENDPOINT=
8+
AZURE_OPENAI_API_KEY=
9+
AZURE_OPENAI_ENDPOINT=
10+
AZURE_OPENAI_API_VERSION=
11+
AZURE_OPENAI_TTS_DEPLOYMENT=
12+
OFSPECTRUM_API_KEY=
13+
OFSPECTRUM_TOKEN_ID=

‎AGENT_GUIDE.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The public SDK repository is:
1212
https://github.com/ofspectrum/python-sdk
1313
```
1414

15-
Customer applications should normally install SDK `1.3.1` with
16-
`pip install "ofspectrum==1.3.1"`; they should not need the private Neo
15+
Customer applications should normally install SDK `1.4.0` with
16+
`pip install "ofspectrum==1.4.0"`; they should not need the private Neo
1717
monorepo source.
1818

1919
If an agent needs SDK source orientation, use the public SDK repository above. From that repository root, inspect these files first:
@@ -237,16 +237,16 @@ Current public token types:
237237

238238
| Type | Notebook Contract | Permanent Account Capacity | Use When |
239239
|------|-------------------|----------------------------|----------|
240-
| Standard | One public notebook; no new private notebooks (zero) | Permanent 1 GiB | The app needs neither a custom verification key nor a new private notebook. |
241-
| Pro | One public notebook; five private notebooks | Permanent 6 GiB | The workflow needs a configurable `public_key` or any new private notebook. |
242-
| Enterprise | One public notebook; ten private notebooks | Permanent 11 GiB | Admin-managed Enterprise workflows. Public SDK callers cannot create this type. |
240+
| Standard | One public notebook; no new private notebooks (zero) | Permanent 100 MiB | The app needs neither a custom verification key nor a new private notebook. |
241+
| Pro | One public notebook; five private notebooks | Permanent 100 MiB | The workflow needs a configurable `public_key` or any new private notebook. |
242+
| Enterprise | One public notebook; ten private notebooks | Permanent 100 MiB | Admin-managed Enterprise workflows. Public SDK callers cannot create this type. |
243243

244244
Recommended behavior:
245245

246246
- Create Standard tokens by default.
247247
- Create Pro tokens when the customer needs a configurable verification key or any new private notebook.
248248
- Existing tokens can be upgraded from Standard to Pro, but cannot be downgraded.
249-
- A Standard-to-Pro upgrade replaces that token's 1 GiB entitlement with 6 GiB; it does not produce 7 GiB.
249+
- A Standard-to-Pro upgrade replaces the token type; storage entitlement stays 100 MiB and does not stack.
250250
- Permanent capacity remains with the account after token retirement.
251251
- A token type upgrade may consume quota or incur a billing charge.
252252
- Store token IDs in the customer app database.
@@ -513,7 +513,7 @@ Additional constraints:
513513
- Private notebook credentials must be unique under the same token.
514514
- Private notebook credentials are optional at the SDK level, but apps that need credential-gated private metadata should explicitly pass `credential_val`.
515515
- Notebook media is limited to detected image, audio, and video content. Each notebook accepts at most 500 current files, each file may be up to 100 MiB, and notebook text is limited to 10 MiB of UTF-8 data.
516-
- Media consumes account capacity. Each acquired Standard, Pro, or Enterprise token contributes a permanent 1, 6, or 11 GiB entitlement respectively; available capacity may also include legacy credit and paid whole-GiB blocks.
516+
- Media consumes account capacity. Each acquired Standard, Pro, or Enterprise token contributes a permanent 100 MiB entitlement; available capacity may also include legacy credit and paid whole-GiB blocks.
517517
- Standard tokens cannot create new private notebooks. Existing Standard private notebooks are grandfathered and remain editable or deletable, but cannot be replaced after deletion.
518518
- Pro tokens support five private notebooks, and Enterprise tokens support ten.
519519
- If a token already has a public notebook, update the existing notebook instead of creating another one.
@@ -913,7 +913,7 @@ Recommended runtime flow:
913913
- API keys are created in the OfSpectrum dashboard, not through the SDK.
914914
- Token IDs, notebook IDs, media IDs, and current revisions should be stored in the customer app database.
915915
- Standard tokens are the safest default for new workflows.
916-
- Standard, Pro, and Enterprise tokens contribute permanent 1, 6, and 11 GiB account capacity respectively.
916+
- Standard, Pro, and Enterprise tokens each contribute a permanent 100 MiB account capacity.
917917
- Pro tokens are needed when the workflow requires a configurable `public_key` or up to five private notebooks; Enterprise creation is Admin-managed.
918918
- Account defaults and storage charge authorization are configured in the Web Console, not through an API key.
919919
- A staged save begins one session and reuses its `save_session_id` across all files and the commit.

‎CHANGELOG.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
## 1.4.0 - 2026-10-02
6+
7+
- Async TTS calls consume synchronous complete-audio iterators and perform
8+
blocking completion work outside the caller's event loop.
9+
- Replacing controller-owned watermark clients preserves in-flight encode
10+
snapshots and retires old clients only after their last active encode.
11+
Caller-owned clients remain caller-owned; explicit close still aborts active
12+
owned clients.
13+
- Concurrent readers of one Azure synthesis future share one watermark encode
14+
and a cached terminal outcome. Separate synthesis futures remain concurrent.
15+
16+
- Added `TTS(provider, client).synthesize(...)` and `synthesize_async(...)` as a
17+
provider-neutral completed-audio interface for ElevenLabs, Gemini, Google
18+
Cloud Text-to-Speech, OpenAI, Azure OpenAI-compatible deployments, and Azure
19+
AI Speech. `TTSResult` returns encoded bytes plus normalized format metadata
20+
and retains the native provider response. Advanced provider arguments remain
21+
available through `provider_options`.
22+
- Added transparent ElevenLabs, Gemini, Google Cloud Text-to-Speech, OpenAI,
23+
and Azure Speech wrappers; Azure OpenAI Speech uses the OpenAI wrapper.
24+
Azure Speech covers completed text, SSML, and audio-config synthesis. The
25+
wrappers include async Gemini/OpenAI clients and OpenAI Chat Completions
26+
audio from models such as `gpt-audio-1.5`. Completed provider audio uses the
27+
existing persistent stream pool by default, so repeated calls on one wrapper reuse
28+
connections automatically. Raw PCM is returned in its original shape after
29+
encoding, and file-only options retain the OneFile path.
30+
- Added a cross-provider latency benchmark mode that compares the normal file
31+
encoder with a prewarmed persistent stream pool on identical TTS output.
32+
- Permanent token storage entitlement is 100 MiB for Standard, Pro, and Enterprise. Paid whole-GiB overage blocks are unchanged.
33+
334
## 1.3.1 - 2026-08-24
435

536
- `open_stream_pool(..., keepalive_interval_seconds=120)` heartbeats every pooled connection so idle Neo model sessions are not retired.

0 commit comments

Comments
 (0)