' Copyright 2012 Nexiwave Canada. All rights reserved. ' Nexiwave Canada PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. Module Module1 Class MyWebClient Inherits System.Net.WebClient Protected Overrides Function GetWebRequest(ByVal address As System.Uri) As System.Net.WebRequest Dim R = MyBase.GetWebRequest(address) R.Timeout = 30 * 60 * 1000 Return R End Function End Class Sub Main() ' change these: Dim user As String = "myname@mycompany.com" Dim passwd As String = "XYZ" Dim wavFile = "C:\temp\myfile.wav" ' send the file Dim url As String = "https://api.nexiwave.com/SpeechIndexing/file/storage/" + user + "/recording/?authData.passwd=" + passwd + "&response=application/raw-transcript&targetDecodingConfigName=voicemail&auto-redirect=true" ' Comment this out receive trainscript as plain text, (for SMS, for example) url = url + "&transcriptFormat=html" Using wc As New MyWebClient() Dim myByteArray As Byte() = wc.UploadFile(url, wavFile) Dim enc As System.Text.Encoding = System.Text.Encoding.ASCII Dim resp As String = enc.GetString(myByteArray) ' perform magic with the transcript here: Console.Write(resp) End Using End Sub End Module