agentkit-sdk 0.3.2__tar.gz → 0.3.4__tar.gz
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.
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/PKG-INFO +1 -1
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/pyproject.toml +1 -1
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/__init__.py +1 -1
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/cli/init.py +1 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/core/pipeline.py +3 -2
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/__init__.py +2 -0
- agentkit_sdk-0.3.4/src/agentkit/providers/tts/__init__.py +6 -0
- agentkit_sdk-0.3.4/src/agentkit/providers/tts/deepgram.py +42 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit_sdk.egg-info/PKG-INFO +1 -1
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit_sdk.egg-info/SOURCES.txt +1 -0
- agentkit_sdk-0.3.2/src/agentkit/providers/tts/__init__.py +0 -5
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/README.md +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/setup.cfg +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/cli/__init__.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/cli/build.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/cli/deploy.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/cli/main.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/cli/serve.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/core/__init__.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/core/context.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/core/turn_detector.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/learning/__init__.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/learning/correction.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/learning/recommender.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/memory/__init__.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/memory/base.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/memory/extractor.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/memory/markdown.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/memory/user_model.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/memory/vector.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/llm/__init__.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/llm/base.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/llm/gemini.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/llm/groq.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/llm/openai.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/stt/__init__.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/stt/base.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/stt/deepgram.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/stt/sarvam.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/tts/base.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/tts/elevenlabs.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/providers/tts/sarvam.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/server/__init__.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit/server/app.py +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit_sdk.egg-info/dependency_links.txt +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit_sdk.egg-info/entry_points.txt +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit_sdk.egg-info/requires.txt +0 -0
- {agentkit_sdk-0.3.2 → agentkit_sdk-0.3.4}/src/agentkit_sdk.egg-info/top_level.txt +0 -0
|
@@ -16,6 +16,7 @@ BUILTIN_PROVIDERS = {
|
|
|
16
16
|
},
|
|
17
17
|
"tts": {
|
|
18
18
|
"sarvam": {"desc": "Sarvam AI", "env": "SARVAM_API_KEY", "defaults": {"voice": "meera", "language_code": "hi-IN"}},
|
|
19
|
+
"deepgram": {"desc": "Deepgram Aura", "env": "DEEPGRAM_API_KEY", "defaults": {"model": "aura-asteria-en"}},
|
|
19
20
|
"elevenlabs": {"desc": "ElevenLabs", "env": "ELEVENLABS_API_KEY", "defaults": {"voice_id": "pNInz6obpgDQGcFmaJgB"}},
|
|
20
21
|
},
|
|
21
22
|
"llm": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import time
|
|
2
3
|
from dataclasses import dataclass, field
|
|
3
4
|
from typing import AsyncIterator
|
|
4
5
|
|
|
@@ -76,7 +77,7 @@ class VoicePipeline:
|
|
|
76
77
|
yield audio_chunk
|
|
77
78
|
|
|
78
79
|
self.conversation_history.append(Message(role="assistant", content=full_response))
|
|
79
|
-
self.turns.append(Turn(user_message=transcription, assistant_message=full_response))
|
|
80
|
+
self.turns.append(Turn(user_message=transcription, assistant_message=full_response, timestamp=time.time()))
|
|
80
81
|
self._last_response = full_response
|
|
81
82
|
|
|
82
83
|
async def process_text(
|
|
@@ -112,7 +113,7 @@ class VoicePipeline:
|
|
|
112
113
|
yield audio_chunk
|
|
113
114
|
|
|
114
115
|
self.conversation_history.append(Message(role="assistant", content=full_response))
|
|
115
|
-
self.turns.append(Turn(user_message=user_message, assistant_message=full_response))
|
|
116
|
+
self.turns.append(Turn(user_message=user_message, assistant_message=full_response, timestamp=time.time()))
|
|
116
117
|
self._last_response = full_response
|
|
117
118
|
|
|
118
119
|
def _is_sentence_end(self, text: str) -> bool:
|
|
@@ -198,6 +198,7 @@ def _register_builtins():
|
|
|
198
198
|
from agentkit.providers.llm.groq import GroqLLM
|
|
199
199
|
from agentkit.providers.llm.openai import OpenAILLM
|
|
200
200
|
from agentkit.providers.tts.sarvam import SarvamTTS
|
|
201
|
+
from agentkit.providers.tts.deepgram import DeepgramTTS
|
|
201
202
|
from agentkit.providers.tts.elevenlabs import ElevenLabsTTS
|
|
202
203
|
from agentkit.memory.markdown import MarkdownMemory
|
|
203
204
|
from agentkit.memory.vector import VectorMemory
|
|
@@ -210,6 +211,7 @@ def _register_builtins():
|
|
|
210
211
|
registry.register("llm", "openai", OpenAILLM)
|
|
211
212
|
|
|
212
213
|
registry.register("tts", "sarvam", SarvamTTS)
|
|
214
|
+
registry.register("tts", "deepgram", DeepgramTTS)
|
|
213
215
|
registry.register("tts", "elevenlabs", ElevenLabsTTS)
|
|
214
216
|
|
|
215
217
|
registry.register("memory", "markdown", MarkdownMemory)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from typing import AsyncIterator
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
|
|
5
|
+
from .base import BaseTTS
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class DeepgramTTS(BaseTTS):
|
|
9
|
+
"""Deepgram Aura text-to-speech provider."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, api_key: str, model: str = "aura-asteria-en", encoding: str = "linear16", sample_rate: int = 16000):
|
|
12
|
+
self.api_key = api_key
|
|
13
|
+
self.model = model
|
|
14
|
+
self.encoding = encoding
|
|
15
|
+
self.sample_rate = sample_rate
|
|
16
|
+
self.base_url = "https://api.deepgram.com/v1/speak"
|
|
17
|
+
|
|
18
|
+
async def synthesize_stream(self, text: str) -> AsyncIterator[bytes]:
|
|
19
|
+
async with httpx.AsyncClient(timeout=30.0) as client:
|
|
20
|
+
response = await client.post(
|
|
21
|
+
self.base_url,
|
|
22
|
+
json={"text": text},
|
|
23
|
+
headers={
|
|
24
|
+
"Authorization": f"Token {self.api_key}",
|
|
25
|
+
"Content-Type": "application/json",
|
|
26
|
+
},
|
|
27
|
+
params={
|
|
28
|
+
"model": self.model,
|
|
29
|
+
"encoding": self.encoding,
|
|
30
|
+
"sample_rate": self.sample_rate,
|
|
31
|
+
},
|
|
32
|
+
)
|
|
33
|
+
if response.status_code == 200:
|
|
34
|
+
yield response.content
|
|
35
|
+
|
|
36
|
+
async def synthesize(self, text: str) -> bytes:
|
|
37
|
+
async for chunk in self.synthesize_stream(text):
|
|
38
|
+
return chunk
|
|
39
|
+
return b""
|
|
40
|
+
|
|
41
|
+
async def close(self):
|
|
42
|
+
pass
|
|
@@ -32,6 +32,7 @@ src/agentkit/providers/stt/deepgram.py
|
|
|
32
32
|
src/agentkit/providers/stt/sarvam.py
|
|
33
33
|
src/agentkit/providers/tts/__init__.py
|
|
34
34
|
src/agentkit/providers/tts/base.py
|
|
35
|
+
src/agentkit/providers/tts/deepgram.py
|
|
35
36
|
src/agentkit/providers/tts/elevenlabs.py
|
|
36
37
|
src/agentkit/providers/tts/sarvam.py
|
|
37
38
|
src/agentkit/server/__init__.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|