Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Need to save text file to wave under classic asp

Posted on 2014-11-12
15
264 Views
Last Modified: 2014-11-12
I have a web application that is written in classic asp and one of it's functions is to take a date string and convert it to a wave file using text to speech and then save it to a folder on the server. This was working using a third party activeX dll and the Microsoft Speech SDK 5.1 but now it has stopped working. When it tries to create the speech object I get a create object failed error in the IIS log. The only difference I can see is that we are now running it on 64 bit Windows 7 instead of 32 bit but I have IIS set to run in 32 bit mode. Unfortunately the third party activeX component is no longer supported.  Can anyone provide me with some sample code in classic asp to perform this operation or is there a better way?
0
Comment
Question by:dssisupport
  • 7
  • 5
  • 3
15 Comments
 
LVL 33

Expert Comment

by:Big Monty
ID: 40437994
make sure your IUSR account (or whatever account you use to run the site) has permissions to the folder where the dll resides
0
 

Author Comment

by:dssisupport
ID: 40438005
By default it put the dll in the system32 folder but I tried moving it to the root folder of my application and re-registered it but still same result. Should I be using the 32bit or 64 bit version of the dll?
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40438015
you want to use the version that your application pool is using.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:dssisupport
ID: 40438045
That's what I thought.  Can't this be done without the third party dll?
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40438052
no, classic asp doesn't have any kind of built in functionality such as that...

what's the exact error message you're seeing in the log file?
0
 

Author Comment

by:dssisupport
ID: 40438326
ASP_0177_:_8004503a|Server.CreateObject_Failed
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 40438361
You need to keep it in system32.  When you went to the new machine, did you remember to give it permissions?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 40438377
There are going to be a lot of javasctipt options that may be easier.

http://www.masswerk.at/mespeak/
https://github.com/hiddentao/google-tts
http://www.jtalkplugin.com/
http://updates.html5rocks.com/2014/01/Web-apps-that-talk---Introduction-to-the-Speech-Synthesis-API

as well as api's you can hit via xmlhttppost
http://tts-api.com/
http://www.ispeech.org/api

I have only used https://www.twilio.com/ but for what you are doing, that may be a cost factor.
0
 

Author Comment

by:dssisupport
ID: 40438427
I unregistered it and then I moved it back to the system32 folder and now I can't register it. It acts like it is missing something but I was able to register it in my web app folder. Very weird. I am going to reboot and try to register it again.

I thought about javascript but the problem with that is this application will sometimes be used in a closed network environment so it may not have access to the api site.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 40438506
What about trying SysWOW64 instead of system32?

Using an external api may not work, but if you load the js files on your own site it should be fine.
0
 

Author Comment

by:dssisupport
ID: 40438558
Oh, yeah. I forgot about the syswow64 folder. Microsoft sure got those system folder names backwards.

I was able to register it now and I enabled permissions to it for the IIS_IUSR and IUSR accounts but still got the same error.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 40438591
I know that registering dll's get tricky.  

What about using the command line?  I found http://jampal.sourceforge.net/ptts.html

You can use asp to hit the command line.  I use image magick http://www.imagemagick.org/ for images and use the command line via classic asp.  Works very nicely (once I got the dll to work with server 2012)
0
 

Author Comment

by:dssisupport
ID: 40438607
That would probably work. How do I trigger the command line using asp?
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 40438711
You will  use  CreateObject("WScript.Shell").

http://classicasp.aspfaq.com/general/how-do-i-execute-a-dos-command/batch-file/exe-from-asp.html
 set wshell = CreateObject("WScript.Shell") 
    wshell.run "%COMSPEC% /C dir c:\ > c:\dir.txt", 0, TRUE 
    set wshell = nothing 

Open in new window


http://www.experts-exchange.com/Programming/Languages/Scripting/ASP/Q_20095277.html#a5949592
Set WshShell = Wscript.CreateObject("WScript.Shell")
CmdLine = "%comspec% /c PING.exe -n 1 194.90.96.193 > ping.txt"
WshShell.Run CmdLine, 1, TRUE

Open in new window


You can also use fso to dynamically create a bat file and run that too.
0
 

Author Comment

by:dssisupport
ID: 40438876
Thanks. I will run with that.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question