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.1.tar.gz (211.1 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.1-py3-none-any.whl (216.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lebai_robot_voice_sdk-0.0.1.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

Hashes for lebai_robot_voice_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8811962980b4ec43d9aae71d9d65d6103a16f12801e84c4574d01acfec7388d8
MD5 3356c66ad5ac56508d80d4bdffdfb5c0
BLAKE2b-256 31b341679da5a8da88134cd66a738353286e2dcb1f4111c515ce39577650840f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lebai_robot_voice_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d76dbfad38f7b5cc95c877b17acecd59a2d661fd923b0a2c4f4986d108a3b1dc
MD5 92aa0ec2411dddd9faffdaefda79f55b
BLAKE2b-256 b7fad9cb6db08d490946124383b75eeed118a3420ceae3ce7ab173f9f97a8cc1

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