Git Product home page Git Product logo

Comments (6)

dpurgin avatar dpurgin commented on September 16, 2024

Hi!

In order to record calls there is a PulseAudio profile called voicecall-record which is available during an established voice call only. As soon as the sound card is in this profile, you can read downmixed voice call data from both parties from the primary sink. Basically that's what the Call Recorder does.

Can you please check if you can write a voice call audio using PA commands? As soon as the call is established. the card must be in voicecall profile:

$ pactl list cards | grep 'Active profile'
Active Profile: voicecall

Then put the card to voicecall-record profile:

$ pactl set-card-profile 0 voicecall-record

Then check if the card is in the voicecall-record profile using the first command. Then try playing with this command that writes data from the active sink:

$ parec --record --device=sink.primary --channels=1 --file-format=wav output.wav

If the output.wav contains feasible audio, then we'll look into Call Recorder itself, there might be some initialisation order to be changed or something.

Can you please also attach the full output of pacmd list-cards and pacmd list-sinks?

from harbour-callrecorder.

juiceme avatar juiceme commented on September 16, 2024

Thanks tor your quick reply!

First I stopped the Call Recorder daemon.
Then I checked the active profile, with no call it is "Active Profile: primary-primary"
and with voicecall going, it is "Active Profile: voicecall"

With call ongoing, I give the command "pactl set-card-profile 0 voicecall-record"
After that, the profile is "Active Profile: voicecall-record"

When I give the parec command, it fails with error message "Stream error: No such entity"

Here are the cards and sinks:
http://www.swagman.org/juice/list_cards.txt
http://www.swagman.org/juice/list_sinks.txt

from harbour-callrecorder.

dpurgin avatar dpurgin commented on September 16, 2024

Sorry, I should have tested the command myself before posting!

The exact command I've just used to record in voicecall-record mode is the following:

$ parec --record --device=sink.primary**.monitor** --file-format=wav --verbose output.wav

Can you please try this one out? You should be able to play the captured audio using

$ paplay output.wav

from harbour-callrecorder.

juiceme avatar juiceme commented on September 16, 2024

Thanks!

It indeed seems there is some glitch ongoing; I tried that and the parec command produced just a fairly small file. (2868 bytes for few minutes of call)

When the call ended, maybe 10 seconds after that the parec command timeouted.

Also, after the call was finished I checked "pactl list cards | grep 'Active'" and that command hung.
When I interrupted that and checked "top", it shows pulseaudio taking about 20% of CPU time...

This time the pulseaudio seems to be in busyloop, still taking 20% CPU after 10 minutes.

## Before voicecall

[nemo@Sailfish ~]$ 
[nemo@Sailfish ~]$ pactl list cards | grep 'Active'
    Active Profile: primary-primary

## Now started voicecall

[nemo@Sailfish ~]$ 
[nemo@Sailfish ~]$ pactl list cards | grep 'Active'
    Active Profile: voicecall
[nemo@Sailfish ~]$ pactl set-card-profile 0 voicecall-record
[nemo@Sailfish ~]$ 
[nemo@Sailfish ~]$ parec --record --device=sink.primary.monitor --file-format=wav --verbose output.wav
Opening a recording stream with sample specification 's16le 2ch 44100Hz' and channel map 'front-left,front-right'.
Connection established.
Stream successfully created.
Buffer metrics: maxlength=4194304, fragsize=352800
Using sample spec 's16le 2ch 44100Hz', channel map 'front-left,front-right'.
Connected to device source.primary (index: 5, suspended: no).
Failed to get latency: Timeout
[nemo@Sailfish ~]$ 

## command timeouted maybe 10 seconds after finishing call, and the next command hung.

[nemo@Sailfish ~]$ pactl list cards | grep 'Active'

^CGot SIGINT, exiting.

[nemo@Sailfish ~]$ 
[nemo@Sailfish ~]$ ls -latr *wav
-rw-rw-r-- 1 nemo nemo 2868 Aug 16 23:42 output.wav
[nemo@Sailfish ~]$ 

from harbour-callrecorder.

dpurgin avatar dpurgin commented on September 16, 2024

I can't really help you then, it seems to be a PulseAudio problem,..

@jusa , can you please take a look?

from harbour-callrecorder.

juiceme avatar juiceme commented on September 16, 2024

Thanks for looking into this anyway.

The fact that both devices work similarily up to the point of actually recording the audio, so that call establishing uses same method in pulseaudio leads me to believe that it is possible to get Call Recorder working for Hammerhead too, provided that this issue is fixed.

Most probably this is a bug in pulseaudio setup/environment rather than in the actual code.
I will have to try looking into it, though it is fairly complicated as I understand.

from harbour-callrecorder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.