xiaozhi-sdk 0.0.10__tar.gz → 0.1.1__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.

Potentially problematic release.


This version of xiaozhi-sdk might be problematic. Click here for more details.

Files changed (35) hide show
  1. {xiaozhi_sdk-0.0.10/xiaozhi_sdk.egg-info → xiaozhi_sdk-0.1.1}/PKG-INFO +1 -1
  2. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/pyproject.toml +10 -12
  3. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/__init__.py +1 -1
  4. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/cli.py +14 -9
  5. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1/xiaozhi_sdk.egg-info}/PKG-INFO +1 -1
  6. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/LICENSE +0 -0
  7. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/MANIFEST.in +0 -0
  8. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/README.md +0 -0
  9. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/audio/greet.wav +0 -0
  10. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/audio/play_music.wav +0 -0
  11. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/audio/say_hello.wav +0 -0
  12. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/audio/take_photo.wav +0 -0
  13. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/image/leijun.jpg +0 -0
  14. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/opus/linux-arm64-libopus.so +0 -0
  15. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/opus/linux-x64-libopus.so +0 -0
  16. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/opus/macos-arm64-libopus.dylib +0 -0
  17. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/opus/macos-x64-libopus.dylib +0 -0
  18. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/file/opus/windows-opus.dll +0 -0
  19. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/setup.cfg +0 -0
  20. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/tests/test_iot.py +0 -0
  21. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/tests/test_pic.py +0 -0
  22. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/tests/test_xiaozhi.py +0 -0
  23. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/__main__.py +0 -0
  24. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/config.py +0 -0
  25. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/core.py +0 -0
  26. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/iot.py +0 -0
  27. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/mcp.py +0 -0
  28. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/opus.py +0 -0
  29. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/utils/__init__.py +0 -0
  30. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/utils/mcp_data.py +0 -0
  31. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk/utils/mcp_tool.py +0 -0
  32. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk.egg-info/SOURCES.txt +0 -0
  33. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk.egg-info/dependency_links.txt +0 -0
  34. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk.egg-info/requires.txt +0 -0
  35. {xiaozhi_sdk-0.0.10 → xiaozhi_sdk-0.1.1}/xiaozhi_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xiaozhi-sdk
3
- Version: 0.0.10
3
+ Version: 0.1.1
4
4
  Summary: 一个用于连接和控制小智智能设备的Python SDK,支持实时音频通信、MCP工具集成和设备管理功能。
5
5
  Author-email: dairoot <623815825@qq.com>
6
6
  License-Expression: MIT
@@ -32,8 +32,6 @@ classifiers = [
32
32
  [project.urls]
33
33
  Homepage = "https://github.com/dairoot/xiaozhi-sdk"
34
34
 
35
-
36
-
37
35
  [tool.setuptools.dynamic]
38
36
  version = {attr = "xiaozhi_sdk.__version__"}
39
37
 
@@ -43,16 +41,8 @@ include = ["xiaozhi_sdk*"]
43
41
  [tool.setuptools.package-data]
44
42
  xiaozhi_sdk = ["../file/**/*"]
45
43
 
46
- # 保留现有的工具配置
47
- [tool.coverage.run]
48
- omit = [
49
- "xiaozhi_sdk/__main__.py",
50
- "xiaozhi_sdk/cli.py",
51
- "tests/*",
52
- ]
53
-
54
- [dependency-groups]
55
- dev = [
44
+ [tool.uv]
45
+ dev-dependencies = [
56
46
  "black>=24.8.0",
57
47
  "flake8>=5.0.4",
58
48
  "flake8-bugbear",
@@ -66,3 +56,11 @@ dev = [
66
56
  "pytest-cov",
67
57
  "build>=0.10",
68
58
  ]
59
+
60
+ # 保留现有的工具配置
61
+ [tool.coverage.run]
62
+ omit = [
63
+ "xiaozhi_sdk/__main__.py",
64
+ "xiaozhi_sdk/cli.py",
65
+ "tests/*",
66
+ ]
@@ -1,3 +1,3 @@
1
- __version__ = "0.0.10"
1
+ __version__ = "0.1.1"
2
2
 
3
3
  from xiaozhi_sdk.core import XiaoZhiWebsocket # noqa
@@ -48,7 +48,7 @@ handler.setFormatter(
48
48
  datefmt="%Y-%m-%d %H:%M:%S",
49
49
  log_colors={
50
50
  "DEBUG": "white",
51
- "INFO": "green",
51
+ "INFO": "white",
52
52
  "INFO1": "green",
53
53
  "INFO2": "cyan",
54
54
  "INFO3": "blue",
@@ -72,14 +72,19 @@ is_end = False
72
72
  async def handle_message(message):
73
73
  """处理接收到的消息"""
74
74
  global is_end
75
- if message["type"] == "stt":
76
- logger.info1("message received: %s", message)
77
- elif message["type"] == "tts":
78
- logger.info2("message received: %s", message)
79
- elif message["type"] == "llm":
80
- logger.info3("message received: %s", message)
81
- else:
82
- logger.info("message received: %s", message)
75
+ if message["type"] == "stt": # 人类语音
76
+ logger.info1("human: %s", message["text"])
77
+ elif message["type"] == "tts" and message["state"] == "sentence_start": # AI语音
78
+ logger.info2("AI: %s", message["text"])
79
+ elif message["type"] == "tts" and message["state"] == "stop":
80
+ pass
81
+ # logger.info2("播放结束")
82
+ # logger.info("聆听中...")
83
+ elif message["type"] == "llm": # 表情
84
+ logger.info3("emotion: %s", message["text"])
85
+ else: # 其他消息
86
+ pass
87
+ # logger.info("other: %s", message)
83
88
 
84
89
  if message["type"] == "websocket" and message["state"] == "close":
85
90
  is_end = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xiaozhi-sdk
3
- Version: 0.0.10
3
+ Version: 0.1.1
4
4
  Summary: 一个用于连接和控制小智智能设备的Python SDK,支持实时音频通信、MCP工具集成和设备管理功能。
5
5
  Author-email: dairoot <623815825@qq.com>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes