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.6.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.6-py3-none-any.whl (216.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lebai_robot_voice_sdk-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 1fb40c019b8f7ad82202123daf77dcd2f9348d2f5d5a20be3e3afd106eb91557
MD5 309a9c55c3022e7bca4752f5a379f2ac
BLAKE2b-256 d252e893f0294f6daf0e8782fafc62c22844a7b05b24db9530251c88039b1b73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lebai_robot_voice_sdk-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e4df90722f1f49e0eaf0079c8a95b5123d3e105421819af819874d2035857094
MD5 0d71d562b79a6da1b5290c670da3c09e
BLAKE2b-256 37d6223c36fd0d3ef27eedbd788a05d428bfe4b7c45d03edb0db34020864b8d8

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