乐白机器人语音播报SDK
Project description
Lebai Robot Voice SDK
乐白机器人语音播报Python SDK。
安装
pip install lebai-robot-voice-sdk
from lebai_robot_voice_sdk import LebaiRobotVoice, LebaiAudioError
创建语音播报实例
voice = LebaiRobotVoice()
try: # 播放循环播报 voice.play_loop_audio()
# 播放机器人急停播报
voice.play_robot_estop()
# 播放碗被拿走播报(index: 0-4)
voice.play_bowl_was_token_available(0)
# 播放缺料语音播报(index: 0-3)
voice.play_cabinet_lack_index(0)
# 播放所有面柜缺料播报
voice.play_all_cabinet_lack()
# 清理料筐播报
voice.play_clean_basket()
# 汤面请等待加汤播报
voice.play_wait_add_soup()
# 放碗下单时的提醒(index: 0-4)
voice.play_put_bowl_remind(0)
# 制作完成提醒(id: 0-4)
voice.play_make_complete_remind(0)
except LebaiAudioError as e: print(f"语音播报错误: {e}")## API 文档
LebaiRobotVoice
主要的语音播报类。
方法
play_robot_estop()- 机器人急停播报play_bowl_was_token_available(index: int)- 碗被拿走播报(index: 0-4)play_cabinet_lack_index(index: int)- 缺料语音播报(index: 0-3)play_all_cabinet_lack()- 所有面柜缺料播报play_clean_basket()- 清理料筐播报play_wait_add_soup()- 汤面请等待加汤播报play_put_bowl_remind(index: int)- 放碗下单时的提醒(index: 0-4)play_make_complete_remind(id: int)- 制作完成提醒(id: 0-4)play_loop_audio()- 循环播报stop()- 停止当前播放close_audio_device()- 关闭音频设备
属性
playing- 是否正在播放音频play_back_device- 播放设备对象
错误处理
所有错误都会抛出 LebaiAudioError 异常。
依赖
- miniaudio >= 1.61
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lebai_robot_voice_sdk-0.0.5.tar.gz.
File metadata
- Download URL: lebai_robot_voice_sdk-0.0.5.tar.gz
- Upload date:
- Size: 211.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60ca5539c8b339096e0b0ab2617ce777cbfbe7e79142c1da619aeabefc9c87a4
|
|
| MD5 |
7ddb8bd26258db851b9bbdf1dc3e20e0
|
|
| BLAKE2b-256 |
140db26fa5d2593e17dfaec9d07beb3c0941dd1f639521a31af76ee4dcdef25c
|
File details
Details for the file lebai_robot_voice_sdk-0.0.5-py3-none-any.whl.
File metadata
- Download URL: lebai_robot_voice_sdk-0.0.5-py3-none-any.whl
- Upload date:
- Size: 216.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e1f9e5397e6d7cdcc588f1e73453ae5620c98a1aae176e038ad0def2477f441
|
|
| MD5 |
66430e0f2529bdf25ee0220e21401e03
|
|
| BLAKE2b-256 |
2ec71ae9176c12ee20cea20a2205a4b0e084fadfedda82d68c3ec8349cdce891
|