Topic: IIS the Sound is played only the server. How to transfer to the client?
Hello, skilled developers of web applications. I ask the help in a solution of a problem.
Itself always wrote on VB6 and a little VB.NET WinForms. And here, it was necessary ASP.NET+VB.NET in the form of a website.
The task, on web page to launch playing of several short mp3 files in a cycle, and on another to synthesize the text in a sound (Text-To-Speech).
I tried to transfer old VB6 the code on web rails here in such type:
For playing mp3:
Private sub PlayFile (FilePath As String) On Error Resume Next PlayFile = mciExecute ("play" AND FilePath) Pause (CInt (4000)) End sub
For text scoring:
Sub SayWithTTS (ByRef sText As String, iVoiceNumber As Int16) Dim objGetVoice As Object = Activator. CreateInstance (Type. GetTypeFromProgID ("SPEECH.SpVoice")) objGetVoice. Voice = objGetVoice. GetVoices. Item (iVoiceNumber) objGetVoice. Speak (sText) End Sub
In a Visual Studio at debugging it at me played all and spoke, as it is necessary to me. Created the installer, installed "MySite" on IIS on the same computer inside Defaul Web Site.
I come on the same computer on http://localhost/MySite/MyPage.aspx - too all plays and TTS sounds the text.
Problem in that when I to the same page
In the house network I am connected from other computer (Linux) or a pad () all sounds are played and are audible only on the computer where there is a web server. And on clients silence. Tables, inscriptions I see. Button "Play" I push and I listen to a sound on the computer with the server. And in a pad silence :-(
How to me to direct a sound to a pad (or other client) which came on page and launched the above-stated code?