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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lebai_robot_voice_sdk-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 319374efe5a0b4edc963bcd7756ecca1cbb6a8288b99052c1974ab12adc82bf6
MD5 e2bd889b9a288602b4fe3d928ec0b882
BLAKE2b-256 349296dccbd6c71352378a478e17b9a698c61ad23f95f9ffea6ad0461f7c2222

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lebai_robot_voice_sdk-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fb6c457fff72d9abcac3a0b8953623848efe2d13417d37b915aee217f186681a
MD5 671984f4cd9d81592158d0a92ff31671
BLAKE2b-256 359b4a60c66555819da982ff28804692df24d3c40803ef7f1372ffd20393ba1d

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