Playback of audio triggered by ESL is too fast

I’ve searched confluence, community slack, and discourse.

Using FS 1.10.7 on recent Debian, when I use ESL to play .wav or .flac into a conference, it is played too fast. I’ve tried changing the sample rate of the file to 48kHz (same as the Opus stream to the Chrome client) and to 8kHz. Both sound accelerated.

Is there anything I could try to reveal the problem?

Can you provide a sample? and steps to replicate it? we can try and see if we experience the same outcome.

Thanks,
/b

I get “An error occurred: Sorry, you can’t include links in your posts.” even after I remove everything that looks to me like a link. And I don’t see a way to attach files, so I will email everything to you.

We’ll dig in and see why you can’t attach, give me a few.

Hello Brian,

The sample audio file you requested is at:
[Removed because I get error “An error occurred: Sorry, new users can only put 2 links in a post.”]

As my ESL client, I’m using GitHub - IvanPenga/switch-esl: Freeswitch event socket library
And I added the following code:

console.info(sNameOfThisFile +` - Trying to connect to host[${sHostForEsl}]...`);
mEslClient.connect()
    .then(xResponse_ignored => {
        console.info(sNameOfThisFile +" - Connected.");
        mEslClient.listen((xSession1) => {
            console.info(sNameOfThisFile +` - FS created new a session with uuid: ${xSession1.uuid}`);

            xSession1.on("CHANNEL_ANSWER", (xData1) => {
                //console.info(sNameOfThisFile ," - CHANNEL_ANSWER:", xData1);
                console.info(sNameOfThisFile ," - CHANNEL_ANSWER.");
            })
            xSession1.on("CHANNEL_PARK", (xData2) => {
                //console.info(sNameOfThisFile ," - CHANNEL_PARK:", xData2);
                let sIdOfFsSession
                        = xData2.variable_uuid,
                    sFilepathOnEfsToPlay
                        = "/efs/appVxml/audio/RW_PleaseFilloutTheSurvey_.wav",
                    sCommandToEsl
                        = `uuid_displace ${sIdOfFsSession} start ${sFilepathOnEfsToPlay}`;
                console.info(`${sNameOfThisFile} - CHANNEL_PARK sIdOfFsSession[${sIdOfFsSession}]\n Sending command to ESL: ${sCommandToEsl}`);
                mEslClient.bgapi(sCommandToEsl);
            })
            xSession1.on("CHANNEL_DESTROY", (xData3) => {
                //console.info(sNameOfThisFile ," - CHANNEL_DESTROY:", xData3);
                console.info(sNameOfThisFile ," - CHANNEL_DESTROY.");
            })
        });
    })
    .catch(xError1 => {
        console.error(sNameOfThisFile ,"- Connection error:", xError1);
    })

Here’s a screencast showing the problem:

Cheers,
David

We cant provide support for a library we didn’t write, If you can get some FreeSWITCH logs we can review? Can you attach some sample files you’re trying to play?

Thanks,
Brian

Here’s the portion of the log covering that session:

I could not find any part of the log relating to ESL, even though we always log at a verbose level.

Here’s the audio file I used:

I provided the sample code in order to get confirmation that I’m using the most appropriate ESL command and syntax.

RW_PleaseFilloutTheSurvey_.wav sample rate 44100 doesn’t match requested rate 48000

Try making it 48k or 48k stereo? If that works, then you could file an issue on github about playing 44.1kHz.

/b

This problem is now tracked in uuid_displace misrecognizes sample rate and plays at accelerated rate · Issue #1863 · signalwire/freeswitch · GitHub

It turns out that changing useStereo from true to false in our verto config allows our 48kHz WAV to play normally.

As I suspected! Thank you for filing the issue.