You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new in .Net and, especially, in the SIP space. I am using this library in order to get a call from a softphone.
I managed to make the connection to receive the call. However, I am having trouble with recording it. I do get a file and some audio in it but the volume is very low and there is a lot of distortion (or noise). I would assume it is a codec problem, or a audio feature one.
This is basically my code. The softphone uses the G729 codec.
`private static readonly WaveFormat _waveFormat = new WaveFormat(8000, 16, 1);
static async Task Main()
{
var outputFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), "NAudio");
Directory.CreateDirectory(outputFolder);
outputFilePath = Path.Combine(outputFolder, "output.wav");
_waveFile = new WaveFileWriter(outputFilePath, _waveFormat);
Hello! I did look at the example! I also managed to find the problem. I used a different codec instead of G729. I used G711 and everything worked. Thanks for the response!
Hello,
I am new in .Net and, especially, in the SIP space. I am using this library in order to get a call from a softphone.
I managed to make the connection to receive the call. However, I am having trouble with recording it. I do get a file and some audio in it but the volume is very low and there is a lot of distortion (or noise). I would assume it is a codec problem, or a audio feature one.
This is basically my code. The softphone uses the G729 codec.
`private static readonly WaveFormat _waveFormat = new WaveFormat(8000, 16, 1);
static async Task Main()
{
var outputFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyMusic), "NAudio");
Directory.CreateDirectory(outputFolder);
outputFilePath = Path.Combine(outputFolder, "output.wav");
_waveFile = new WaveFileWriter(outputFilePath, _waveFormat);
}
private static void OnRtpPacketReceived(IPEndPoint remoteEndPoint, SDPMediaTypesEnum mediaType, RTPPacket rtpPacket)
{
if (mediaType == SDPMediaTypesEnum.audio)
{
var sample = rtpPacket.Payload;
}`
The text was updated successfully, but these errors were encountered: