How to develop your own Skype call recording software for Windows with the Skype desktop API?

Source: Internet
Author: User

Skype is a free voice software, which can point-to-point with computers for free voice calls, and it charges the low cost With calls directly to the fixed telephone or mobile phone, Skype offers excellent quality and won the favor of many users All through the world, I am a faithful user of Skype, below is my Skype screenshots:

Why We need a Skype for call recording system?

I often use Skype with my Taiwan compatriots when I am in mainland, sometimes my business requires a call recording on Sk ype:www.purecalifornia.co.uk for retaining purpose, I has this on my mind about so time, however, Skype official did n OT provide call recording capabilities, we had to find our own-to-figure it out, luckily I can build my own "Skype re Corder "with C + +, this is the reason why I love programming.

How to develop your own call recorder for Skype with the Skype public API?

The programming ideas and source code contributions out and encourage one another, hoping to give the programming friends Who is interested to provide a little help and then I'll be satisfied.

At the beginning of writing this program, I tried using a conventional tape recording of a sound recording, since it is a Skype Call recording, we is hoping to own and each other's voice sound simultaneously recorded. First of all, we want each of the other's voice can recorded, it can only choose "Stereo Mix" channel recording, but this time The sound "microphone" channel would be discarded, which means, and the other party would not hear me in Skype speak; Secondly, we have to is my own voice recorded, also open the "microphone" channel recording, but during a Skype call, "mic Rophone "Channel have been occupied by Skype, which means we program cannot be recorded again, it seems the normal Recordi ng mode does not work in such case.

Inside of Skype public API

So, I think the underlying Windows audio processing mechanism, any voice audio data processing software to the end is INS Eparable from the underlying Windows audio Win32 API function, see the following screenshot:

With these functions, I find a-to-use the Windows system hooks to detour original address of these audio functions use D by Skype Voice calls. The Skype program calls these APIs before they come into my Win32 API functions, I'll obtain the Skype's audio data sec Retly "with a copy parts passed to my own application, then the function returned to Skype, so can mysteriously call I n The voice data taken out, together with their own MP3 compression module to save the audio data to a disk file.

Key to record the audio data from a Skype call

All the above are the whole idea of recording Skype, now I am going to introduce the code.

Since our program needs to being embedded into the Skype for program, so we can only use the form DLL to the write this program, now I need to modify the class to write a Win32 API function address, where I direct reference to the book "Windows Core Progr Amming ", I had the source code provided in this class which can modify the address Win32 API function When we modify the ad Dress after a good API function, Skype calls previously six function system automatically, then call our function, see th E Code:

At this point, Skype for audio streams in a Skype for call (the other party and myself speak voice) has been "stolen", as long as It can compressed into MP3 format, it's OK to download the file to playback, I use the "Hw_mp3_enc. DLL Library" to E Ncode the recording stream, the quality is great, and it can be used to make a telephone recording as well.

There is a interesting feature for Skype call recording, it's possible to insert the other side of the "the" Into the Lef T channel, which means my own voice is on the right track, and just like the other people face-to-face in the dialogue. Since It isn't difficult to understand, we can learn it from the above code, in fact, the input and output of audio data is acquired independently, they is incorporated into the MP3 files by saving the input data in the left channel and OUTP UT of data storage for the right channel.

Now this is called "Skype for Call recorder", besides has a recording function, there is an automatic reply function includ Ed, in order to achieve the this function, we need to has the steps:

A) When the incoming call was ringing, switching the recording channel to the "Stereo mixing", and play the prepared audio File into the Skype call.

B) After the call is ended. Using the Waveinprepareheader function to replace recorded sound from the microphone, using this method is difficult to co Ntrol, but can find a lot of strange effect, such as phone voice, etc.

There is something else need to pay attention, which are the program hooks, by intercepting the Skype for audio data, and it ' s Execution efficiency is very high, for slow processing operations (such As:mp3 compressed data, data saving, etc.) is the Best working in the other thread processing, otherwise it would affect the quality of Skype calling, cause intermittent FE Eling, and call recording data is lost.

How to develop your own Skype call recording software for Windows with the Skype desktop API?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.