bump version to 0.2.1; enhance error message for simulstreaming missing dependencies

This commit is contained in:
Quentin Fuxa 2025-06-27 14:06:35 +02:00
parent b42d8b2692
commit 7c0768e8f3
2 changed files with 6 additions and 5 deletions

View file

@ -1,7 +1,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup( setup(
name="whisperlivekit", name="whisperlivekit",
version="0.1.9", version="0.2.1",
description="Real-time, Fully Local Whisper's Speech-to-Text and Speaker Diarization", description="Real-time, Fully Local Whisper's Speech-to-Text and Speaker Diarization",
long_description=open("README.md", "r", encoding="utf-8").read(), long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
@ -34,6 +34,7 @@ setup(
}, },
package_data={ package_data={
'whisperlivekit': ['web/*.html'], 'whisperlivekit': ['web/*.html'],
'whisperlivekit.simul_whisper': ['dual_license_simulstreaming.md'],
}, },
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [

View file

@ -14,9 +14,9 @@ from whisperlivekit.timed_objects import ASRToken
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
try: try:
from simul_whisper.config import AlignAttConfig from whisperlivekit.simul_whisper.config import AlignAttConfig
from simul_whisper.simul_whisper import PaddedAlignAttWhisper, DEC_PAD from whisperlivekit.simul_whisper.simul_whisper import PaddedAlignAttWhisper, DEC_PAD
from simul_whisper.whisper import tokenizer from whisperlivekit.simul_whisper.whisper import tokenizer
SIMULSTREAMING_AVAILABLE = True SIMULSTREAMING_AVAILABLE = True
except ImportError: except ImportError:
logger.warning("SimulStreaming dependencies not available. SimulStreaming backend will not be available.") logger.warning("SimulStreaming dependencies not available. SimulStreaming backend will not be available.")
@ -315,7 +315,7 @@ class SimulStreamingASR(ASRBase):
def __init__(self, lan, modelsize=None, cache_dir=None, model_dir=None, logfile=sys.stderr, **kwargs): def __init__(self, lan, modelsize=None, cache_dir=None, model_dir=None, logfile=sys.stderr, **kwargs):
if not SIMULSTREAMING_AVAILABLE: if not SIMULSTREAMING_AVAILABLE:
raise ImportError("SimulStreaming dependencies are not available. Please install SimulStreaming requirements.") raise ImportError("""SimulStreaming dependencies are not available. Please install WhisperLiveKit using pip install "whisperlivekit[simulstreaming]". If you are building from source, you should also copy the content of the simul_whisper directory from the SimulStreaming repository into whisperlivekit/simul_whisper.""")
with open("whisperlivekit/simul_whisper/dual_license_simulstreaming.md", "r") as f: with open("whisperlivekit/simul_whisper/dual_license_simulstreaming.md", "r") as f:
print("*"*80 + f.read() + "*"*80) print("*"*80 + f.read() + "*"*80)
self.logfile = logfile self.logfile = logfile