Skip to content

Commit

Permalink
new package name
Browse files Browse the repository at this point in the history
  • Loading branch information
hamees-sayed committed Dec 27, 2024
1 parent 9ebe2fe commit 5502d2b
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ We've partnered with OpenAI on a new `MultimodalAgent` API in the Agents framewo
| Azure OpenAI | livekit-plugins-openai | | | [openai.TTS.with_azure()](https://docs.livekit.io/python/livekit/plugins/openai/#livekit.plugins.openai.TTS.with_azure) |
| Google | livekit-plugins-google ||| [google.TTS()](https://docs.livekit.io/python/livekit/plugins/google/index.html#livekit.plugins.google.TTS) |
| Deepgram | livekit-plugins-deepgram || | [deepgram.TTS()](https://docs.livekit.io/python/livekit/plugins/deepgram/index.html#livekit.plugins.deepgram.TTS) |
| SmallestAI | livekit-plugins-smallest | | | [smallest.TTS()](https://docs.livekit.io/python/livekit/plugins/smallest/index.html#livekit.plugins.smallest.TTS)]
| SmallestAI | livekit-plugins-smallestai | | | [smallestai.TTS()](https://docs.livekit.io/python/livekit/plugins/smallest/index.html#livekit.plugins.smallestai.TTS) |

### Other plugins

Expand Down
2 changes: 1 addition & 1 deletion livekit-plugins/install_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ pip install \
"${SCRIPT_DIR}/livekit-plugins-playai" \
"${SCRIPT_DIR}/livekit-plugins-silero" \
"${SCRIPT_DIR}/livekit-plugins-turn-detector" \
"${SCRIPT_DIR}/livekit-plugins-smallest"
"${SCRIPT_DIR}/livekit-plugins-smallestai"
2 changes: 1 addition & 1 deletion livekit-plugins/install_plugins_editable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ pip install -e ./livekit-plugins-llama-index --config-settings editable_mode=str
pip install -e ./livekit-plugins-turn-detector --config-settings editable_mode=strict
pip install -e ./livekit-plugins-silero --config-settings editable_mode=strict
pip install -e ./livekit-plugins-browser --config-settings editable_mode=strict
pip install -e ./livekit-plugins-smallest --config-settings editable_mode=strict
pip install -e ./livekit-plugins-smallestai --config-settings editable_mode=strict

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Agent Framework plugin for voice synthesis with [Smallest](https://smallest.ai/)
## Installation

```bash
pip install livekit-plugins-smallest
pip install livekit-plugins-smallestai
```

## Pre-requisites
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import logging

logger = logging.getLogger("livekit.plugins.smallestai")
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from typing import Literal, List, Tuple, cast

Check failure on line 1 in livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallest/models.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallest/models.py:1:20: F401 `typing.Literal` imported but unused

Check failure on line 1 in livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallest/models.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallest/models.py:1:42: F401 `typing.cast` imported but unused
import aiohttp
import asyncio

API_BASE_URL = "https://waves-api.smallest.ai/api/v1"

Check failure on line 5 in livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallest/models.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

livekit-plugins/livekit-plugins-smallestai/livekit/plugins/smallest/models.py:1:1: I001 Import block is un-sorted or un-formatted

async def _fetch_voice_and_model() -> Tuple[List[str], List[str]]:
async with aiohttp.ClientSession() as session:
async with session.get(f"{API_BASE_URL}/voice/get-all-models") as response:
api_response = await response.json()

voices = []
for model in api_response:
for voice in model['voiceIds']:
voices.append(voice['voiceId'])
models = [model['modelName'] for model in api_response]
return models, voices

models, voices = asyncio.run(_fetch_voice_and_model())

TTSLanguages = ["en", "hi"]
TTSModels = models
TTSVoices = voices
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "livekit-plugins-smallest",
"name": "livekit-plugins-smallestai",
"private": true,
"version": "1.0.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only",
],
keywords=["webrtc", "realtime", "audio", "video", "livekit", "smallest"],
keywords=["webrtc", "realtime", "audio", "video", "livekit", "smallestai"],
license="Apache-2.0",
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
python_requires=">=3.9.0",
install_requires=["livekit-agents[codecs]>=0.8.0.dev0"],
package_data={"livekit.plugins.smallest": ["py.typed"]},
package_data={"livekit.plugins.smallestai": ["py.typed"]},
project_urls={
"Documentation": "https://docs.livekit.io",
"Website": "https://livekit.io/",
Expand Down
7 changes: 7 additions & 0 deletions tests/test_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
google,
openai,
playai,
smallestai
)

from .conftest import TEST_CONNECT_OPTIONS
Expand Down Expand Up @@ -53,6 +54,7 @@ async def _assert_valid_synthesized_audio(
pytest.param(lambda: cartesia.TTS(), id="cartesia"),
pytest.param(lambda: deepgram.TTS(), id="deepgram"),
pytest.param(lambda: playai.TTS(), id="playai"),
pytest.param(lambda: smallestai.TTS(), id="smallestai")
]


Expand Down Expand Up @@ -97,6 +99,11 @@ async def test_synthesize(tts_factory):
),
id="azure.stream",
),
pytest.param(
lambda: agents.tts.StreamAdapter(
tts=smallestai.TTS(), sentence_tokenizer=STREAM_SENT_TOKENIZER
),
),
pytest.param(lambda: deepgram.TTS(), id="deepgram"),
pytest.param(lambda: playai.TTS(), id="playai"),
]
Expand Down

0 comments on commit 5502d2b

Please sign in to comment.