Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么关闭原有的语音对话,监听麦克风数据后,自定义chatgpt进行语音播报 #3

Open
xyzzzzzzzzzzzzzzzzzz opened this issue Jan 4, 2024 · 1 comment

Comments

@xyzzzzzzzzzzzzzzzzzz
Copy link

No description provided.

@yjrqz777
Copy link

关闭的接口,找不到但是可以给你提供一个办法,识别获取文字之后,等狗咬说话之前通过服务,强行让他闭嘴,这样他就是只识别的状态。

    def get_text_callback(self,text):
        # self.get_logger().info("hk_node")
        self.get_logger().info(text.data)
        Empty2 = Empty.Request()
        for i in range(0,7):
            time.sleep(0.1)
            self.stop_paly_.call_async(Empty2)

完全代码在这里
https://github.com/yjrqz777/cyberdog2_ros2_galactic/blob/master/audio_test/audio_test/audio_t.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants