Help - Search - Members - Calendar
Full Version: Using Voice Streams in VBS script
Skype Community > English > Development, Betas and Skype Garage > Skype Public API
mathiasvissers
Hi

First I've downloaded this example script: https://developer.skype.com/Docs/Skype4COMLib/Call_vbs

Now, I want to implement the new feature off "Voice Streams" to play a wav-soundfile when Skype is calling:
https://developer.skype.com/Docs/DevNotes?a...otes2.6beta.pdf (page 3)
https://developer.skype.com/Docs/ApiDoc/Voice_Streams
https://developer.skype.com/Docs/ApiDoc/CALL_object (--> Input)

To implement this feature, I've used https://developer.skype.com/Docs/Skype4COMLib/Command_vbs as example for the programming part.

But I can't get it working.
Here is a snippt of my code:


'// Place a call:
Set oCall = oSkype.PlaceCall(oUser.Handle)

'// Wait until the call is in progress and return the relevant error if any other status occurs:
Do While oCall.Status <> cCallStatus_Inprogress
If oCall.Status = cCallStatus_Failed Or _
oCall.Status = cCallStatus_Refused Or _
oCall.Status = cCallStatus_Cancelled Or _
oCall.Status = cCallStatus_Finished Or _
oCall.Status = cCallStatus_Busy Then
Err.Raise vbObjectError + 1, "", "Call status: " & oSkype.Convert.CallStatusToText(oCall.Status)
End If
WScript.Sleep(500)
Loop

WScript.Sleep(10000)
oSkype.SendCommand(oSkype.Command(2201, "GET CALL INPUT SOUNDCARD=""default"", PORT=""12345"", FILE=""C:\temp\test.wav""", "INPUT"))
WScript.Echo "Sendcommand sent"
WScript.Sleep(500)


He is executing the command, but no sound is playing. I also don't know that the command is 100% correct, but no errors are thrown...

Any advice is helpfull.

Thanks in advance

Kind regards
Mathias
TheUberOverlord
QUOTE(mathiasvissers @ Fri Jun 1 2007, 04:27) [snapback]401575[/snapback]

Hi

First I've downloaded this example script: https://developer.skype.com/Docs/Skype4COMLib/Call_vbs

Now, I want to implement the new feature off "Voice Streams" to play a wav-soundfile when Skype is calling:
https://developer.skype.com/Docs/DevNotes?a...otes2.6beta.pdf (page 3)
https://developer.skype.com/Docs/ApiDoc/Voice_Streams
https://developer.skype.com/Docs/ApiDoc/CALL_object (--> Input)

To implement this feature, I've used https://developer.skype.com/Docs/Skype4COMLib/Command_vbs as example for the programming part.

But I can't get it working.
Here is a snippt of my code:


'// Place a call:
Set oCall = oSkype.PlaceCall(oUser.Handle)

'// Wait until the call is in progress and return the relevant error if any other status occurs:
Do While oCall.Status <> cCallStatus_Inprogress
If oCall.Status = cCallStatus_Failed Or _
oCall.Status = cCallStatus_Refused Or _
oCall.Status = cCallStatus_Cancelled Or _
oCall.Status = cCallStatus_Finished Or _
oCall.Status = cCallStatus_Busy Then
Err.Raise vbObjectError + 1, "", "Call status: " & oSkype.Convert.CallStatusToText(oCall.Status)
End If
WScript.Sleep(500)
Loop

WScript.Sleep(10000)
oSkype.SendCommand(oSkype.Command(2201, "GET CALL INPUT SOUNDCARD=""default"", PORT=""12345"", FILE=""C:\temp\test.wav""", "INPUT"))
WScript.Echo "Sendcommand sent"
WScript.Sleep(500)


He is executing the command, but no sound is playing. I also don't know that the command is 100% correct, but no errors are thrown...

Any advice is helpfull.

Thanks in advance

Kind regards
Mathias


To be safe, to make sure your .wav file is in fact 16kbs and 16 sample format, save some output from a Skype call and use that file as your input file, if this works, then the other file you are using is not the correct format according to the 2.6 API release notes:

https://developer.skype.com/Docs/DevNotes?a...otes2.6beta.pdf


mathiasvissers
Thanks for your reply.

I've done that, but whithout succes.

But I'm not sure about this line

oSkype.SendCommand(oSkype.Command(2201, "GET CALL INPUT SOUNDCARD=""default"", PORT=""12345"", FILE=""C:\temp\test.wav""", "INPUT"))

is the syntax correct?
mathiasvissers
It's working :-)

Code: oSkype.SendCommand(oSkype.Command(1, "ALTER CALL " & oCall.Id & " SET_INPUT FILE=""C:\temp\test.wav""", "INPUT"))


Now I have to search how to make more than one call at once...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.