Which Khadas SBC do you use?
vim3
BOARD=VIM3
VENDOR=Amlogic
VERSION=1.0.11
ARCH=arm64
INITRD_ARCH=arm64
INSTALL_TYPE=EMMC
IMAGE_VERSION=1.0.11-220429
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-v1.0.11-release
LINUX_GIT_VERSION=khadas-vims-v1.0.11-release
FENIX_GIT_VERSION=v1.0.11
#############################################
Which system do you use? Android, Ubuntu, OOWOW or others?
Ubuntu
Which version of system do you use? Khadas official images, self built images, or others?
vim3-ubuntu-20.04-server-linux-4.9-fenix-1.0.11-220429-emmc.img.xz
Please describe your issue below:
usb外接声卡 无法播放声音,安装有espeak ffmpeg libespeak1
Post a console log of your issue below:
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: set_params:1374: Channels count non available
numbqq
May 23, 2023, 6:40am
#2
你是如何播放的?有没有指定到对应声卡?把当前声卡列出来看看。
aplay -l
使用python的 pyttsx3 包播放
安装pip install pyttsx3
使用
import pyttsx3
pyttsx3.speak(“hello world”)
执行aplay -l如下所示
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
**** List of PLAYBACK Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dit-hifi-alsaPORT-spdif-b dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-A-dummy-alsaPORT-pcm multicodec-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: TDM-C-dummy multicodec-2 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 3: SPDIF-dit-hifi-alsaPORT-spdif dit-hifi-3 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
pcm.!default{
type hw
card 1
device 0
}
ctl.!default{
type hw
card 1
}
声卡已经配置成usb的card 1 了 还是不行
numbqq
May 24, 2023, 2:27am
#7
Hello @googleearth
试试用aplay播放有没有声音?
aplay -Dhw:1,0 /usr/share//sounds/alsa/Noise.wav
numbqq
May 24, 2023, 3:17am
#9
googleearth:
这个是有声音的
那就说明USB声卡是正常的。
googleearth:
请问一下要如何支持中文播放。
这个命令只是播放wav文件而已,播放的就是wav文件的内容。你说的中文播放指什么?
wav上传了中文内容的, 播放一直是噪音,不播放正常的wav内容
numbqq
May 24, 2023, 6:08am
#11
Hello @googleearth
你确定文件是wav格式的?这个文件在电脑上是否可以播放?方便的话提供下你测试的文件。
numbqq
May 24, 2023, 10:54am
#13
Hello @googleearth
直接通过hdmi播放呢?是否有声音?
$ aplay ba8a008b3040f0059607091de531877f.wav
numbqq
May 26, 2023, 1:01am
#15
Hello @googleearth
你这个wav文件不是pcm编码的,直接用aplay播放有问题。
ba8a008b3040f0059607091de531877f.wav: RIFF (little-endian) data, WAVE audio, IMA ADPCM, mono 11025 Hz
试试这个wav文件。
$ wget https://dl.khadas.com/.test/test002.wav
$ aplay -Dhw:1,0 test002.wav