Skip to main content

乐白机器人语音播报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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lebai_robot_voice_sdk-0.0.7.tar.gz (211.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lebai_robot_voice_sdk-0.0.7-py3-none-any.whl (216.8 kB view details)

Uploaded Python 3

File details

Details for the file lebai_robot_voice_sdk-0.0.7.tar.gz.

File metadata

  • Download URL: lebai_robot_voice_sdk-0.0.7.tar.gz
  • Upload date:
  • Size: 211.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for lebai_robot_voice_sdk-0.0.7.tar.gz
Algorithm Hash digest
SHA256 a792fe99b839c01f5bcd64cee1eed55a773a426abd218fdbdc9a2fc496fd5722
MD5 eda815c792b24012fbfd55779db427a8
BLAKE2b-256 77e52e627abfe2ae790a97b3e8151aab4827ba04a1764523b65d6d9ef72779ba

See more details on using hashes here.

File details

Details for the file lebai_robot_voice_sdk-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for lebai_robot_voice_sdk-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b4c3d7e188a0488ed913dff162433375ade8240c84ff42f7793a4199ead7b028
MD5 95db411241c41fef32220f126d652c74
BLAKE2b-256 801dde39fd896f9d9d99e660c89daed406c240d18cb2a64cf51534f62ce8f243

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page