问题:
---------------------------------------------------------------------------
在hilens studio中测试输出音频,显示错误
将技能安装到hilens中亦没有任何输出
注1:hilens固件版本:1.3.3;
注2:附件中包括acc音频文件
源代码如下:
-------------------------------------------------------------------------
#! /usr/bin/python3.7
import os
import hilens
# import wave
def run(work_path):
# 系统初始化,参数要与创建技能时填写的检验值保持一致
hilens.init("hello")
audio_out = hilens.audiooutput()
audio_out.play_aac_file(os.path.join(work_path, 'rain.acc'), 3)
hilens.terminate()
if __name__ == "__main__":
run(os.getcwd())
错误提示:
-------------------------------------------------------------------------
cd /home/huser/projects/hello_world_python_haq
python3 /home/huser/projects/hello_world_python_haq/start.py
[huser@studio-ide-679f67bb45-866xw ~]$ cd /home/huser/projects/hello_world_python_haq
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$ python3 /home/huser/projects/hello_world_python_haq/start.py
[sfw]2022-06-18 06:30:27.596[info](11414-device_checker.cpp:71)----- start detectdevice ------
[device]2022-06-18 06:30:27.618[info](11414-acl_mediaplugin.cpp:19)-----------load acl_c75 media---------
[device]2022-06-18 06:30:27.871[info](11414-acl_inferplugin.cpp:26)-----------load acl_c75 infer---------
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$ cd /home/huser/projects/hello_world_python_haq
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$ python3 /home/huser/projects/hello_world_python_haq/start.py
[sfw]2022-06-18 06:30:35.051[info](11501-device_checker.cpp:71)----- start detectdevice ------
[device]2022-06-18 06:30:35.073[info](11501-acl_mediaplugin.cpp:19)-----------load acl_c75 media---------
[device]2022-06-18 06:30:35.326[info](11501-acl_inferplugin.cpp:26)-----------load acl_c75 infer---------
segmentation fault (core dumped)
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$
python3 /home/huser/projects/hello_world_python_haq/start.py
[huser@studio-ide-679f67bb45-866xw ~]$ cd /home/huser/projects/hello_world_python_haq
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$ python3 /home/huser/projects/hello_world_python_haq/start.py
[sfw]2022-06-18 06:30:27.596[info](11414-device_checker.cpp:71)----- start detectdevice ------
[device]2022-06-18 06:30:27.618[info](11414-acl_mediaplugin.cpp:19)-----------load acl_c75 media---------
[device]2022-06-18 06:30:27.871[info](11414-acl_inferplugin.cpp:26)-----------load acl_c75 infer---------
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$ cd /home/huser/projects/hello_world_python_haq
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$ python3 /home/huser/projects/hello_world_python_haq/start.py
[sfw]2022-06-18 06:30:35.051[info](11501-device_checker.cpp:71)----- start detectdevice ------
[device]2022-06-18 06:30:35.073[info](11501-acl_mediaplugin.cpp:19)-----------load acl_c75 media---------
[device]2022-06-18 06:30:35.326[info](11501-acl_inferplugin.cpp:26)-----------load acl_c75 infer---------
segmentation fault (core dumped)
[huser@studio-ide-679f67bb45-866xw hello_world_python_haq]$
麻烦帮忙看下如何解决,谢谢!
截图如下:
-----------------------------------------------------------------------
131.86 kb,下载次数:2
这个不会,帮顶一下~
感谢!
hilens studio中没有相关驱动,所以无法使用音频模块。 安装到hilens kit上,正常来说接上耳机或者音响可以听到声音,如果没有声音看下日志中有什么报错。
查了日志,和studio中报错一样。麻烦您指导一下有无解决方式,谢谢!