modular-voice-agent-sdk 2.9.1 → 2.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backends/agent/index.js +4 -4
- package/dist/backends/cloud/audio-llm.js +1 -1
- package/dist/backends/cloud/index.js +4 -4
- package/dist/backends/cloud/llm.js +2 -2
- package/dist/backends/index.js +1 -1
- package/dist/backends/native/audio-llm.js +1 -1
- package/dist/backends/native/index.js +5 -5
- package/dist/backends/native/llm.js +1 -1
- package/dist/backends/native/tts.js +4 -4
- package/dist/backends/transformers/index.js +3 -3
- package/dist/backends/transformers/llm.js +1 -1
- package/dist/backends/transformers/tts.js +1 -1
- package/dist/cli.js +2 -2
- package/dist/client/index.js +8 -8
- package/dist/client/transports/index.js +2 -2
- package/dist/client/voice-client.js +7 -7
- package/dist/index.js +4 -4
- package/dist/server/handler.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/services/index.js +2 -2
- package/dist/setup.js +2 -2
- package/dist/voice-pipeline.js +1 -1
- package/package.json +4 -3
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* only receives text responses and tool activity notifications.
|
|
7
7
|
*/
|
|
8
8
|
// Core
|
|
9
|
-
export { AgentLLM } from './llm';
|
|
9
|
+
export { AgentLLM } from './llm.js';
|
|
10
10
|
// Providers
|
|
11
|
-
export { OpenCodeAgentProvider } from './opencode-provider';
|
|
12
|
-
export { PiAgentProvider } from './pi-agent-provider';
|
|
13
|
-
export { PiCodingAgentProvider } from './pi-coding-agent-provider';
|
|
11
|
+
export { OpenCodeAgentProvider } from './opencode-provider.js';
|
|
12
|
+
export { PiAgentProvider } from './pi-agent-provider.js';
|
|
13
|
+
export { PiCodingAgentProvider } from './pi-coding-agent-provider.js';
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Works with: OpenAI gpt-audio-mini, gpt-audio, and other audio-capable OpenAI-compatible endpoints.
|
|
14
14
|
*/
|
|
15
|
-
import { LLMLogger, LLMConversationTracker } from '../../services';
|
|
15
|
+
import { LLMLogger, LLMConversationTracker } from '../../services/index.js';
|
|
16
16
|
export class CloudAudioLLM {
|
|
17
17
|
config;
|
|
18
18
|
ready = false;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Cloud Backend - Multi-provider API support
|
|
3
3
|
* Works with: OpenAI, Anthropic, Ollama, vLLM, LMStudio, and any compatible endpoint
|
|
4
4
|
*/
|
|
5
|
-
export { CloudLLM } from './llm';
|
|
5
|
+
export { CloudLLM } from './llm.js';
|
|
6
6
|
// Audio LLM (multimodal - implements both STTPipeline and LLMPipeline)
|
|
7
|
-
export { CloudAudioLLM } from './audio-llm';
|
|
8
|
-
export { OpenAICompletionsProvider } from './openai-provider';
|
|
9
|
-
export { AnthropicMessagesProvider } from './anthropic-provider';
|
|
7
|
+
export { CloudAudioLLM } from './audio-llm.js';
|
|
8
|
+
export { OpenAICompletionsProvider } from './openai-provider.js';
|
|
9
|
+
export { AnthropicMessagesProvider } from './anthropic-provider.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Uses native fetch with streaming - no external dependencies required.
|
|
6
6
|
* Supports native tool calling via provider-specific APIs.
|
|
7
7
|
*/
|
|
8
|
-
import { LLMLogger, LLMConversationTracker } from '../../services';
|
|
9
|
-
import { OpenAICompletionsProvider } from './openai-provider';
|
|
8
|
+
import { LLMLogger, LLMConversationTracker } from '../../services/index.js';
|
|
9
|
+
import { OpenAICompletionsProvider } from './openai-provider.js';
|
|
10
10
|
export class CloudLLM {
|
|
11
11
|
config;
|
|
12
12
|
provider;
|
package/dist/backends/index.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
// Native backends must be imported directly: import { ... } from 'modular-voice-agent-sdk/native'
|
|
3
3
|
// Cloud backends must be imported directly: import { CloudLLM } from 'modular-voice-agent-sdk/cloud'
|
|
4
4
|
// Web Speech APIs are in the client module: import { WebSpeechSTT, WebSpeechTTS } from 'modular-voice-agent-sdk/client'
|
|
5
|
-
export * from './transformers';
|
|
5
|
+
export * from './transformers/index.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -16,7 +16,7 @@ import { spawn } from 'child_process';
|
|
|
16
16
|
import { existsSync, writeFileSync, unlinkSync } from 'fs';
|
|
17
17
|
import { tmpdir } from 'os';
|
|
18
18
|
import { join } from 'path';
|
|
19
|
-
import { LLMLogger, LLMConversationTracker } from '../../services';
|
|
19
|
+
import { LLMLogger, LLMConversationTracker } from '../../services.js';
|
|
20
20
|
export class NativeAudioLLM {
|
|
21
21
|
config;
|
|
22
22
|
ready = false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { NativeSTT } from './stt';
|
|
2
|
-
export { NativeLLM } from './llm';
|
|
3
|
-
export { NativeTTS, synthesizeToWav } from './tts';
|
|
4
|
-
export { PiperTTSProvider, KokoroTTSProvider } from './tts-providers';
|
|
1
|
+
export { NativeSTT } from './stt.js';
|
|
2
|
+
export { NativeLLM } from './llm.js';
|
|
3
|
+
export { NativeTTS, synthesizeToWav } from './tts.js';
|
|
4
|
+
export { PiperTTSProvider, KokoroTTSProvider } from './tts-providers.js';
|
|
5
5
|
// Cache utilities (Node.js only)
|
|
6
|
-
export { getCacheDir, getModelsDir, getBinDir, getModelPath, getBinaryPath, defaultBinaries, getCacheStatus, checkModelsInstalled, } from '../../cache';
|
|
6
|
+
export { getCacheDir, getModelsDir, getBinDir, getModelPath, getBinaryPath, defaultBinaries, getCacheStatus, checkModelsInstalled, } from '../../cache.js';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -13,7 +13,7 @@ import { spawn } from 'child_process';
|
|
|
13
13
|
import { existsSync, writeFileSync, unlinkSync } from 'fs';
|
|
14
14
|
import { tmpdir } from 'os';
|
|
15
15
|
import { join } from 'path';
|
|
16
|
-
import { LLMLogger, LLMConversationTracker } from '../../services';
|
|
16
|
+
import { LLMLogger, LLMConversationTracker } from '../../services/index.js';
|
|
17
17
|
export class NativeLLM {
|
|
18
18
|
config;
|
|
19
19
|
ready = false;
|
|
@@ -9,10 +9,10 @@ import { execSync } from 'child_process';
|
|
|
9
9
|
import { existsSync, readFileSync, unlinkSync } from 'fs';
|
|
10
10
|
import { join } from 'path';
|
|
11
11
|
import { tmpdir } from 'os';
|
|
12
|
-
import { BufferedAudioPlayable } from '../../types';
|
|
13
|
-
import { PiperTTSProvider } from './tts-providers';
|
|
14
|
-
import { getBinaryPath } from '../../cache';
|
|
15
|
-
import { encodeWav } from '../../server/encoding';
|
|
12
|
+
import { BufferedAudioPlayable } from '../../types.js';
|
|
13
|
+
import { PiperTTSProvider } from './tts-providers.js';
|
|
14
|
+
import { getBinaryPath } from '../../cache.js';
|
|
15
|
+
import { encodeWav } from '../../server/encoding.js';
|
|
16
16
|
export class NativeTTS {
|
|
17
17
|
config;
|
|
18
18
|
provider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TransformersSTT } from './stt';
|
|
2
|
-
export { TransformersLLM } from './llm';
|
|
3
|
-
export { TransformersTTS } from './tts';
|
|
1
|
+
export { TransformersSTT } from './stt.js';
|
|
2
|
+
export { TransformersLLM } from './llm.js';
|
|
3
|
+
export { TransformersTTS } from './tts.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* for JSON-based tool calling, parsed by VoicePipeline.
|
|
11
11
|
*/
|
|
12
12
|
import { pipeline } from '@huggingface/transformers';
|
|
13
|
-
import { LLMLogger, LLMConversationTracker } from '../../services';
|
|
13
|
+
import { LLMLogger, LLMConversationTracker } from '../../services/index.js';
|
|
14
14
|
export class TransformersLLM {
|
|
15
15
|
config;
|
|
16
16
|
modelStore;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Supports SpeechT5 and other TTS models from Hugging Face.
|
|
6
6
|
*/
|
|
7
7
|
import { pipeline } from '@huggingface/transformers';
|
|
8
|
-
import { BufferedAudioPlayable } from '../../types';
|
|
8
|
+
import { BufferedAudioPlayable } from '../../types.js';
|
|
9
9
|
export class TransformersTTS {
|
|
10
10
|
config;
|
|
11
11
|
modelStore;
|
package/dist/cli.js
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { readdirSync, statSync } from 'fs';
|
|
13
13
|
import { join } from 'path';
|
|
14
|
-
import { getCacheDir, getModelsDir } from './cache';
|
|
15
|
-
import { setup, setupBinaries } from './setup';
|
|
14
|
+
import { getCacheDir, getModelsDir } from './cache.js';
|
|
15
|
+
import { setup, setupBinaries } from './setup.js';
|
|
16
16
|
// ============ CLI Progress Reporter ============
|
|
17
17
|
function cliProgressReporter(event) {
|
|
18
18
|
switch (event.type) {
|
package/dist/client/index.js
CHANGED
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
// Main SDK
|
|
24
|
-
export { VoiceClient, createVoiceClient } from './voice-client';
|
|
24
|
+
export { VoiceClient, createVoiceClient } from './voice-client.js';
|
|
25
25
|
// Browser speech APIs (for local STT/TTS)
|
|
26
|
-
export { WebSpeechSTT } from './web-speech-stt';
|
|
27
|
-
export { WebSpeechTTS } from './web-speech-tts';
|
|
28
|
-
export { WebSocketTransport } from './transports/websocket';
|
|
29
|
-
export { HttpSseTransport } from './transports/http-sse';
|
|
26
|
+
export { WebSpeechSTT } from './web-speech-stt.js';
|
|
27
|
+
export { WebSpeechTTS } from './web-speech-tts.js';
|
|
28
|
+
export { WebSocketTransport } from './transports/websocket.js';
|
|
29
|
+
export { HttpSseTransport } from './transports/http-sse.js';
|
|
30
30
|
// Lower-level utilities (for custom implementations)
|
|
31
|
-
export { AudioRecorder } from './audio-recorder';
|
|
32
|
-
export { AudioPlayer } from './audio-player';
|
|
31
|
+
export { AudioRecorder } from './audio-recorder.js';
|
|
32
|
+
export { AudioPlayer } from './audio-player.js';
|
|
33
33
|
// Protocol types and utilities
|
|
34
|
-
export { float32ToBase64, base64ToFloat32, generateId, } from './protocol';
|
|
34
|
+
export { float32ToBase64, base64ToFloat32, generateId, } from './protocol.js';
|
|
35
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { WebSocketTransport } from './websocket';
|
|
2
|
-
export { HttpSseTransport } from './http-sse';
|
|
1
|
+
export { WebSocketTransport } from './websocket.js';
|
|
2
|
+
export { HttpSseTransport } from './http-sse.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
* - Custom: Pass any Transport implementation via the transport option
|
|
18
18
|
* - Built-in alternatives: HttpSseTransport (HTTP POST + SSE)
|
|
19
19
|
*/
|
|
20
|
-
import { VoicePipeline } from '../voice-pipeline';
|
|
21
|
-
import { AudioRecorder } from './audio-recorder';
|
|
22
|
-
import { AudioPlayer } from './audio-player';
|
|
23
|
-
import { WebSpeechSTT } from './web-speech-stt';
|
|
24
|
-
import { WebSpeechTTS } from './web-speech-tts';
|
|
25
|
-
import { float32ToBase64, base64ToFloat32, generateId, } from './protocol';
|
|
26
|
-
import { WebSocketTransport } from './transports/websocket';
|
|
20
|
+
import { VoicePipeline } from '../voice-pipeline.js';
|
|
21
|
+
import { AudioRecorder } from './audio-recorder.js';
|
|
22
|
+
import { AudioPlayer } from './audio-player.js';
|
|
23
|
+
import { WebSpeechSTT } from './web-speech-stt.js';
|
|
24
|
+
import { WebSpeechTTS } from './web-speech-tts.js';
|
|
25
|
+
import { float32ToBase64, base64ToFloat32, generateId, } from './protocol.js';
|
|
26
|
+
import { WebSocketTransport } from './transports/websocket.js';
|
|
27
27
|
// ============ Helpers ============
|
|
28
28
|
function isWebSpeechSTT(obj) {
|
|
29
29
|
return obj instanceof WebSpeechSTT;
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Isomorphic STT → LLM → TTS pipeline
|
|
4
4
|
*/
|
|
5
5
|
// Main orchestrator
|
|
6
|
-
export { VoicePipeline, createVoicePipeline } from './voice-pipeline';
|
|
6
|
+
export { VoicePipeline, createVoicePipeline } from './voice-pipeline.js';
|
|
7
7
|
// Types
|
|
8
|
-
export * from './types';
|
|
8
|
+
export * from './types.js';
|
|
9
9
|
// Backends
|
|
10
|
-
export * from './backends';
|
|
10
|
+
export * from './backends/index.js';
|
|
11
11
|
// Services
|
|
12
|
-
export * from './services';
|
|
12
|
+
export * from './services/index.js';
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/dist/server/handler.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Supports capability negotiation - skips STT/TTS when client handles them.
|
|
6
6
|
* Each session has its own conversation history, backends, and state.
|
|
7
7
|
*/
|
|
8
|
-
import { generateId } from '../client/protocol';
|
|
9
|
-
import { float32ToBase64Node, base64ToFloat32Node, concatFloat32Arrays } from './encoding';
|
|
8
|
+
import { generateId } from '../client/protocol.js';
|
|
9
|
+
import { float32ToBase64Node, base64ToFloat32Node, concatFloat32Arrays } from './encoding.js';
|
|
10
10
|
const DEFAULT_SILENCE_TIMEOUT_MS = 5000;
|
|
11
11
|
const DEFAULT_MAX_RECORDING_MS = 90000;
|
|
12
12
|
/**
|
package/dist/server/index.js
CHANGED
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
* });
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export { createPipelineHandler, PipelineHandler, PipelineSession } from './handler';
|
|
27
|
+
export { createPipelineHandler, PipelineHandler, PipelineSession } from './handler.js';
|
|
28
28
|
// Re-export protocol types for server use
|
|
29
|
-
export { float32ToBase64, base64ToFloat32, generateId, } from '../client/protocol';
|
|
29
|
+
export { float32ToBase64, base64ToFloat32, generateId, } from '../client/protocol.js';
|
|
30
30
|
// Server-side encoding utilities (use Buffer for efficiency in Node.js)
|
|
31
|
-
export { encodeWav, float32ToBase64Node, base64ToFloat32Node } from './encoding';
|
|
31
|
+
export { encodeWav, float32ToBase64Node, base64ToFloat32Node } from './encoding.js';
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
package/dist/services/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { TextNormalizer } from './text-normalizer';
|
|
2
|
-
export { LLMLogger, LLMConversationTracker, getDefaultLogger, getDefaultTracker } from './llm-logger';
|
|
1
|
+
export { TextNormalizer } from './text-normalizer.js';
|
|
2
|
+
export { LLMLogger, LLMConversationTracker, getDefaultLogger, getDefaultTracker } from './llm-logger.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/setup.js
CHANGED
|
@@ -19,9 +19,9 @@ import { spawn, execSync, spawnSync } from 'child_process';
|
|
|
19
19
|
import { existsSync, readFileSync, mkdirSync, unlinkSync, statSync, createReadStream } from 'fs';
|
|
20
20
|
import { createHash } from 'crypto';
|
|
21
21
|
import { basename, join } from 'path';
|
|
22
|
-
import { getModelsDir } from './cache';
|
|
22
|
+
import { getModelsDir } from './cache.js';
|
|
23
23
|
// Re-export cache status utilities so consumers only need one import
|
|
24
|
-
export { checkModelsInstalled, getCacheStatus, getCacheDir, getModelsDir, getBinDir } from './cache';
|
|
24
|
+
export { checkModelsInstalled, getCacheStatus, getCacheDir, getModelsDir, getBinDir } from './cache.js';
|
|
25
25
|
// ============ Internal Helpers ============
|
|
26
26
|
function formatBytes(bytes) {
|
|
27
27
|
if (bytes < 1024)
|
package/dist/voice-pipeline.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The pipeline is stateless - callers manage conversation history via ConversationContext.
|
|
9
9
|
*/
|
|
10
|
-
import { TextNormalizer, getDefaultLogger } from './services';
|
|
10
|
+
import { TextNormalizer, getDefaultLogger } from './services/index.js';
|
|
11
11
|
/** Maximum number of tool call iterations to prevent infinite loops */
|
|
12
12
|
const MAX_TOOL_ITERATIONS = 10;
|
|
13
13
|
/** Default filler phrases while executing tools */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modular-voice-agent-sdk",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "Modular isomorphic STT → LLM → TTS pipeline library for AI voice agents and voice assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,12 +41,13 @@
|
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"dist",
|
|
44
|
-
"scripts",
|
|
44
|
+
"scripts/setup-binaries.sh",
|
|
45
|
+
"scripts/setup.sh",
|
|
45
46
|
"README.md",
|
|
46
47
|
"USAGE.md"
|
|
47
48
|
],
|
|
48
49
|
"scripts": {
|
|
49
|
-
"build": "tsc -p tsconfig.build.json",
|
|
50
|
+
"build": "tsc -p tsconfig.build.json && node scripts/fix-esm-imports.mjs",
|
|
50
51
|
"dev": "tsc -p tsconfig.build.json --watch",
|
|
51
52
|
"prepublishOnly": "npm run build"
|
|
52
53
|
},
|