Usb外接声卡无法播放声音,no version information available

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

你是如何播放的?有没有指定到对应声卡?把当前声卡列出来看看。

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

Card1 是USB声卡,你有选择这个声卡吗?

pcm.!default{
type hw
card 1
device 0
}

ctl.!default{
type hw
card 1
}

声卡已经配置成usb的card 1 了 还是不行

Hello @googleearth

试试用aplay播放有没有声音?

aplay -Dhw:1,0 /usr/share//sounds/alsa/Noise.wav

这个是有声音的,请问一下要如何支持中文播放。

那就说明USB声卡是正常的。

这个命令只是播放wav文件而已,播放的就是wav文件的内容。你说的中文播放指什么?

wav上传了中文内容的, 播放一直是噪音,不播放正常的wav内容

Hello @googleearth

你确定文件是wav格式的?这个文件在电脑上是否可以播放?方便的话提供下你测试的文件。

电脑是可以播放的。 这里不能上传文件,我发一下下载连接,可以直接下载。https://yun.lnpan.com/music/download/ring/000/054/ba8a008b3040f0059607091de531877f.wav

Hello @googleearth

直接通过hdmi播放呢?是否有声音?

$ aplay ba8a008b3040f0059607091de531877f.wav

就是用aplay 播放的。 播放一直噪音

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