如何编码 WAV 与 SIPp 一起玩 [英] How to encode WAV to play with SIPp

查看:49
本文介绍了如何编码 WAV 与 SIPp 一起玩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过查看另一个 SIPp 相关问题,我了解到现在可以使用 rtp_stream 操作播放 WAV 文件.

By looking into another SIPp related question I learned that it is now possible to play WAV files using the rtp_stream action.

我尝试了几个不同的 WAV 文件,但都没有成功.我得到的只是一些噪音,而不是预期的声音.

I've tried several different WAV files with no success. All I get is some noise instead of the expected sound.

在上述问题的一条评论中,有一条简单的说明可以将 WAV 文件转换为兼容格式,但效果不佳.

In one comment in the mentioned question there is a simple instruction to convert a WAV file to a compatible format but it didn't work as well.

我也尝试使用 sox 来转换 this文件没有成功.

I've also tried to use sox to convert this file with no success.

谁能指导我如何生成有效的 WAV 文件以与 SIPp 一起使用?

Can anyone instruct me on how to generate a valid WAV file to be used with SIPp?

这是我的 recv 200 OK 命令,其中包括播放音频操作:

This is my recv 200 OK command which includes the play audio action:

<recv response="200" rtd="true">
  <action>
    <exec rtp_stream="sorry_dave.wav,-1" />
  </action>
</recv>

推荐答案

我正在寻找不同的 WAV 文件编码,并在 维基百科.

I was looking for different WAV file encodings and found a lot of them on Wikipedia.

我找到了一个文件(8,000 Hz µ-Law) 与 rtp_stream="8kulaw.wav,-1,0" exec 参数一起正常工作.

I've found one file (8,000 Hz µ-Law) that works correctly with the rtp_stream="8kulaw.wav,-1,0" exec parameter.

这是文件信息:

ubuntu@mylinux:~/$ file 8kulaw.wav
8kulaw.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, mono 8000 Hz

我尝试对这个文件进行编码使用这个 Sox 命令到完全相同的配置,但它没有工作:

I've tried to encode this file to the exact same configuration using this Sox command but it did NOT worked:

sox -r 8000 -e u-law sorry_dave.wav sorry_dave4.wav

这篇关于如何编码 WAV 与 SIPp 一起玩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆