Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Send an audio file

Help
C_Mueller
2012-06-22
2012-12-06
  • C_Mueller
    C_Mueller
    2012-06-22

    Hi yohannmartineau,

    first of all, thanks to your great work.

    Im currently using the library from peers in a software project and it works good so far. I am able to initiate a phonecall and so on.

    My question now: Is it possible to send an audio file to the callee after he picked up the phonecall. I don't want to initiate a usual phonecall. It should just play the audio file, and wait till the callee hung up.

    I tried to figure out how to get the audio file into a RTP Packet and then how to send this packet to the callee after he picked up the phonecall. But i m stuck here. I could not find an option to send the RTP packet.

    Any hint or information would be great to get this to work.

    Thank you for your time and best regards

     
  • hi,

    you should replace access to net.sourceforge.peers.media.SoundManager with a FileManager or something like that; This file should be encoded as raw data with the same format as microphone (linear PCM 8kHz, 16 bits signed, mono-channel, little endian). You can transcode your file using audacity and "export data". Thus you will just have to replace SoundManager with FileManager and read raw data from file in this new class.

    Let me know if it's not clear.

     
  • C_Mueller
    C_Mueller
    2012-06-25

    Thanks a lot, for your quick reply.

    I guess this should be clear now :) I ll give it a try and let you know how it worked.

     
  • prodip gogoi
    prodip gogoi
    2012-09-10

    I too get this problem. every time i am getting some noise only. in my project i am using freeTTS for generating speech.

     
  • Apurv Tiwari
    Apurv Tiwari
    2012-10-03

    prodip,
    I had a similar issue a couple of days back. As yohannmartineau correctly specifies, it must be linear PCM 8kHz, 16 bits signed, mono-channel, little endian. FreeTTS sends you big endian.
    Fix that and you will be fine :-)