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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lebai_robot_voice_sdk-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c382f4f8cb9226ae7aac10297fb109ea06bb06c8d5c493bcb973ed2b34ab4649
MD5 a4b6e030c8cbd09af9420fe4b70a396e
BLAKE2b-256 61138c20b4528ae73f8139df75c9b6dd0406f2d203e2d40af67ae82e8bce856f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lebai_robot_voice_sdk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa5237a8afd922a004db2b180be994f7a5cd0003c7e5ecfed3a7fa643583614c
MD5 15b2f8111290f69cfa30412f2b474013
BLAKE2b-256 754dd6865d99333899af22a69d3d5353b62c69bd5238dafb15c6a9d5bb349b63

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