TwoWay Audio problem

Arrayan

n3wb
Dec 12, 2017
1
1
Hi, i'm trying to implement a two way audio app but i cant get the audio encoding to work. I use the ISAPI methods :

curl -X PUT "http://admin:admin@192.168.xx.xx/ISAPI/System/TwoWayAudio/channels/1/open"

<?xml version="1.0" encoding="UTF-8"?>
<TwoWayAudioSession version="2.0" xmlns="Oops:The page you are visiting may have been deleted,renamed or inaccessible.">
<sessionId>1943264390</sessionId>
</TwoWayAudioSession>

curl -H "Content-Type: application/binary" -X PUT -d @didi.pcm http://admin:admin@192.168.xx.xx/ISAPI/System/TwoWayAudio/channels/1/audioData

HTTP/1.1 200 OK
Date: Mon, 08 Jan 2018 18:25:16 GMT
Server: App-webs/
Connection: close
Content-Length: 302
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="2.0" xmlns="Oops:The page you are visiting may have been deleted,renamed or inaccessible.">
<requestURL>/ISAPI/System/TwoWayAudio/channels/1/audioData</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
<subStatusCode>ok</subStatusCode>
</ResponseStatus>

So far everything looks ok, but the problem is that i have tried almost all the audio bitrate, samplingrate, encoding, endiannes combination possible and i cant get a clear audio reproduction in the camera. All of them sounds with an incredible amount of noise and a pitched up annoying effect. Is there a way to get the two way audio reproduction to work? Or is it closed to some obscure hikvision encoding ? Thanks in advance!
 
  • Like
Reactions: mat200
So far everything looks ok, but the problem is that i have tried almost all the audio bitrate, samplingrate, encoding, endiannes combination possible and i cant get a clear audio reproduction in the camera. All of them sounds with an incredible amount of noise and a pitched up annoying effect. Is there a way to get the two way audio reproduction to work? Or is it closed to some obscure hikvision encoding ? Thanks in advance!
PUT by Curl - it's not work.
Share your ipc & i play any song on it ;)

For myself, for the test, I write a console utility in C, which plays sounds from the outside, transmitted by the parameters on the command line, on the camera.
Of course i did 1 variant with ulaw codec. This codec must be setting at the ipc & for other codec need white some diff code.
It was interesting task
The main thing, that it POSSIBLE TO DO ;)
It was here Аудио оповещение через аудиовыход камеры - Неофициальный форум технической поддержки Hikvision
 
PUT by Curl - it's not work.
Share your ipc & i play any song on it ;)

For myself, for the test, I write a console utility in C, which plays sounds from the outside, transmitted by the parameters on the command line, on the camera.
Of course i did 1 variant with ulaw codec. This codec must be setting at the ipc & for other codec need white some diff code.
It was interesting task
The main thing, that it POSSIBLE TO DO ;)
It was here Аудио оповещение через аудиовыход камеры - Неофициальный форум технической поддержки Hikvision
Thanks for your replay. Is it possible that you could share the consolue utility in C? I would appreciate a little description of how to run it and what it dose, that make this possible.
 
Thanks for your replay. Is it possible that you could share the consolue utility in C? I would appreciate a little description of how to run it and what it dose, that make this possible.
Let's test 1st.
Share your ipc.
 
Let's test 1st.
Share your ipc.
Why would I do that? Please let me know how you did so we could continue develop this and encurage the development. I'm capable to execute and code by myself offline, thanks. If you need to test something you can do that on your end.

My goal is to develop a dorrbell that is comunicating between the camera and Google Home (this is done). But I would also like to play a wav file or similar every time someone hit the dorr bell button thrue the Two Way Audio to the outside camera. Today I'm able to play only some nosice before I open the communication to the Google API using curl.
 
I close reserch this project not yesterday with own old ipc.
Need new(actual) ipc, need time to remember how it with special setting at ipc.
What is your model & firmware version?
 
The one on my test bench is a DS-2CD2542FWD with fw: V5.5.0 build 170725, also a bit old, guessing from arround 2017.
 
The one on my test bench is a DS-2CD2542FWD with fw: V5.5.0 build 170725, also a bit old, guessing from arround 2017.
Audio alert via Hikvision camera audio output (TwoWayAudio)

Code:
/*
* Copyright(C) iTuneDVR www.iTineDVR.ru @iTuneDVR
*    FileName: HSWP.cpp
* Description:
*     Version: 1.0
*      Author: iTuneDVR
* Create Date: 2018-10-22
* Modification History
*   2021-01-22 Share for http://ipcamtalk.com/threads/twoway-audio-problem.25351/#post-522957
*/
...

 

Attachments

  • 2021-01-22_19-11-43.png
    2021-01-22_19-11-43.png
    32.3 KB · Views: 36
Last edited:
Hi @FTell92 do you have the google hub working with 2 way audio? I am using home assistant, i have attached an nodemcu to the relay of an intercom, that whay i can start the rtsp stream on google hub when someone pressed the doorbell.... But i miss the Audio.
Can you share how you do it?
 
I can also open the door relay with google assistant with ISAPI, so audio is the only thing missing for me
 
Подскажите, есть ли возможность передать звук на 2CD2443G0-I передать звук?
Так выше же исходники выложены и там все подробно как это сделать. ;)
 
Thanks, I'm trying the application but getting the follow error, any idea how to fix it?

NET_DVR_StartVoiceCom_MR_V30 fail 29

Thanks

Seems to be working now, I just copied the DLL to the same directory as the executable.
The playback is scratchy, is this normal or should the playback be smooth and uninterrupted?

Cheers
 
;)

Should be flat, but your effect is also known
Show your ipc audio setting & what sound you try?
Good day. Faced the same problem.
On a laptop with WIN10x64 it did not work, it twitched, but on a computer, it also worked well with WIN10x64.
Try changing your computer