Solved 2 column Table to *.wav,

April 16, 2013 at 18:14:22
Specs: Windows 7
In its simplist form, I would like to be able to submit a two column table and get a pile of *.wav files in return. In the first column would be the name to be assigned the text in the second column after it was converted to speech. So, if I had 10 rows in my 2 column table, I would end up with 10 wav files. The second column would contain the words I wanted converted to speech.
The contents of my input file would be like this. Example:
File1 This is the text for File 1.
File2 This is the text for File 2

And the results would be:
File1.wav
File2.wav
The .wav file must be in the format of PCM 44.100kHz 16 Bit, Mono.

When played, File1 would say "This is the text for file 1."

Hope that this is clear. My input data is in Excel, and there are many columns. I would like to be able to tell a program which columns are the two to be processed. But, I can put just the two columns in a text file or Tab Delimited (csv would be a bad idea as folks may have commas in thier data).

Any Ideas? Thanks. <removed>@sbcglobal.net


See More: 2 column Table to *.wav,

Report •

✔ Best Answer
April 20, 2013 at 21:02:14
Try this modified script (which eliminates the full-path requirement, and adds some debugging analysis):

vocal=0 'choices: 0,1,2 microsoft sam, mary, mike
Set voice = CreateObject("SAPI.SpVoice")
Set fStream = CreateObject("SAPI.SpFileStream")
Set fso = CreateObject("Scripting.FileSystemObject")
Set excel = CreateObject("Excel.Application")
Set wb = Nothing
set voices=voice.getvoices
set voice.voice=voices(vocal)
excel.DisplayAlerts = False
fStream.Format.Type = 34 ' valid range: 4-67 in win-xp

For Each arg In WScript.Arguments
fil=fso.getabsolutepathname(".")&"\"&arg
wscript.echo "xls: "&fil
If fso.FileExists(arg) Then
'disabled error-trapping on next line
' On Error Resume Next
Set wb = excel.Workbooks.Open(fil, False, False)
On Error GoTo 0
If Not wb Is Nothing Then
Set cell = wb.Sheets(1).Cells(1)
Do Until cell = ""
'debugging display
wscript.echo "cell (.wav filename):"&cell&".wav"
fStream.Open cell & ".wav", 3
Set voice.AudioOutputStream = fStream
set c=cell.offset(0,1)
do until c=""
voice.Speak c
set c=c.offset(0,1)
loop
fStream.Close
Set cell = cell.Offset(1, 0)
Loop
wb.Close
End If
End If
Next 'arg
excel.Quit : Set excel = Nothing
'==== end

save this as a new .vbs (tts2.vbs, f/e), then try the commandline experiment (now you don't need the fullpath, just the xls filename). (I don't know much drag/drop, therefore I don't trust it entirely, but that's just me.) Try it either way, and come back with the error message...
4-21: edited to allow multiple columns of speech, added voice sel.



#1
April 16, 2013 at 19:12:43
I wanted to do the same thing myself, but much less ambitiously. I just wanted to be able to "patch" text-to-speech output into something like "sndrec32" microphone input (yielding a .wav result), but of course without any hardware, and command-line (non-GUI). Needless to say, I haven't succeeded. You can google "text to wav" (and some variations) and get software - some free. That is obviously the primary obstacle your project faces. The rest is just window-dressing (no pun intended, i swear!) You can easily split a text-file apart on the first space or comma using batch or vbscript or pshell or..., with token 1 being the filename, token 2 being all the speech content (including commas and spaces). If anyone else in this forum responds, I would be very interested to see if that conversion can be done without 3rd party software. Not a big deal, but it would be kind-of handy sometimes...

Report •

#2
April 16, 2013 at 19:18:07
Need a GUI, not much at Command Line stuff. It looks simple to me, from my searches. But most programs take FILES and convert them to Files. I want to take Text and convert it to wav files, a bunch at a time, as illustrated above. Wish I was a programmer......

Report •

#3
April 17, 2013 at 09:35:00
Assuming your table starts at A1 on the first sheet, something like this should work. Save it as a .vbs file. Then drag and drop your Excel file onto the VBScript icon.

Set voice = CreateObject("SAPI.SpVoice")
Set fStream = CreateObject("SAPI.SpFileStream")
Set fso = CreateObject("Scripting.FileSystemObject")
Set excel = CreateObject("Excel.Application")
Set wb = Nothing

excel.DisplayAlerts = False
fStream.Format.Type = 34

For Each arg In WScript.Arguments
  If fso.FileExists(arg) Then
    On Error Resume Next
      Set wb = excel.Workbooks.Open(arg, False, False)
    On Error GoTo 0
    If Not wb Is Nothing Then
      Set cell = wb.Sheets(1).Cells(1)
      Do Until cell = ""
        fStream.Open cell & ".wav", 3
        Set voice.AudioOutputStream = fStream
        voice.Speak cell.Offset(0, 1)
        fStream.Close
        Set cell = cell.Offset(1, 0)
      Loop
      wb.Close
    End If
  End If
Next 'arg
excel.Quit : Set excel = Nothing

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
April 17, 2013 at 15:42:21
Wow, you named that tune in 26 notes, cool. But, I am VBS Challenged. I did a File Save As in Excel, and VBS was not an option. Is it possible to write a GUI that can access the Excel/Text file?

Report •

#5
April 17, 2013 at 16:12:17
Probably not by me. An excuse to play with the Speech API was enough to pique my curiosity, but it takes more than that for me to break out the compiler and start programming.

Step 1) Open Notepad, paste text
Step 2) File -> Save As -> "TTS.vbs"
Step 3) Save table and close Excel. (Important because the script can't open the file if something else has it open.)
Step 4) Locate "TTS.vbs" and the Excel file, then drag the Excel file onto the VBScript file.
Step 5) If everything goes well, you should have a number of .wav files in the same location as the .vbs file, and not an error dialog.

How To Ask Questions The Smart Way


Report •

#6
April 17, 2013 at 19:42:37
I tried to add to my last reply, but for some reason, the cursor was showing up in strange places. Thanks for the help.

If I understand this correctly, I am going to strip my multi column Excel File down to the two columns I need (name, text) and save it as a xls file. I am going to copy the text you sent me to Notepad, and save it as TTS.vbs. Then, I am going to open Windows Explorer(?) and drag the VBS onto the XLS and magic will happen. Have I got it right? That, I can do. Please confirm instructions above.


Report •

#7
April 17, 2013 at 20:18:54
Almost. Drag the XLS onto the VBS.

How To Ask Questions The Smart Way


Report •

#8
April 17, 2013 at 20:25:40
I copied the two columns (Name, Text) to a new XLS file and saved it. The first column has the name I would like the wav filename to be, the second column has the text I want the wav to contain. The first column just has a few text words, with no period or extension.

This is what I get.

Line 18
Char: 9
Filename or class name not found during Automation
Code 800A01B0
Source MS VBScript runtime error.

I am amazed it is that easy to run the program.


Report •

#9
April 18, 2013 at 07:16:45
This is what I get.
Can you post the A column? It's complaining something in that column is not a valid file name. Possibly the first element, unless you do get some .wav files.

I am amazed it is that easy to run the program.
If it wasn't easy, I probably wouldn't bother.

How To Ask Questions The Smart Way


Report •

#10
April 18, 2013 at 11:55:41
I will have to re-create it, Excel says it is locked for editing. No problem,

I created another very simple one. This is the data.

Test1 This is test one.
Test2 This is test two.
Test3 This is test three.

Except it was in Excel and there were two columns. I get the exact same error when I run this one. This file has 3 records, the other has 9, so not sure where line 18 in the error message is coming from. Hope this helps. I have many files and some have as many as 150 records. So I hope I can automate it, and not have to keep using my voice.

There were no *.wav's created in either case.


Report •

#11
April 18, 2013 at 18:09:24
@Razor:
Cool! Thanks Razor, for this technique. It worked great. I wish I was better at figuring out how to figure out how to make these things work. (google-challenged, i guess...)
Everything worked, including the excel stuff (which I wasn't all that interested in), but the argument needed the fully qualified path to the xls file. Once it had that, it spit out the wav files, which functioned "as advertised".
@OP: My excel had only two columns: filename, and "everything else" (the speech). It would be easy enough to make column 2 into another filename containing larger amounts of speech, if needed. I am not familiar with gui (drag/drop) interface, so I don't know if your tts.vbs was receiving the fully-qual. path. Some debugging (wscript.echo arg) would tell. Like I said, mine worked fine from command-prompt with the f.q.pathfilename.
PS: @OP: I did the drag-drop crappola, and it still worked. My xls was about the same: col1: file1, file2. col2: text to speak blah blah
But I was running on winXP. commandline:
cd \work
cscript razorttw.vbs \work\book4.xls
::end
note that I did put the extension of .xls. razorttw.vbs is also in \work.

Report •

#12
April 20, 2013 at 05:31:46
@Razor, @OP, I am sure you guys understand how to add the fully qualified path to the code, but I don't. I am happy with the drag and drop solution, but what do I have to do to get it to work for me? Thanks, ww4cash.

Report •

#13
April 20, 2013 at 13:03:44
You might try this test from the command-prompt: Open the command-window (run CMD.EXE), then navigate to the directory where the tts.vbs is located (cd \dir1\dir2\blah...) to whatever location. Now execute like this:
cscript tts.vbs \dir1\dir2\blah\book1.xls
and see if you get the same error, or if you get the .wav files as named (in column 1 of the xls file, verify by: dir *.wav). If you get the error, please post the full content of it, and also the contents of column 1 (at least row 1). Just use your short test-sheet for this, nothing long or fancy. When/if you post back, we can go from there. Since it worked on my end, (both xp and seven), then it's got to be something simple or local to your environment.

Report •

#14
April 20, 2013 at 13:59:42
Sorry to be such a pain. Tried it in CMD mode with, and without the directory bit in the command line. No errors shown. But, When I do a search in the root for *.wav and sort them by date, none in April.

Data looks like this.
Test 1


Report •

#15
April 20, 2013 at 14:11:23
Sorry, hit submit too early.

Test1 This is Test1.
Test2 This is Test two.
Test3 This is Test Three.

Did the search both ways, cmd and Windows Explorer for *.wav.

Both the TTS.vbs and TTS Test.xlsx are in the same folder. This was true when I was dropping the xls onto the vbs.

I created the VBS by copy/paste the code suggested into Notepad, and saving it as a *.* file named TTS.vbs so it wasn't saved as TTS.vbs.txt. I am using Windows 7. I have another PC I can copy this to and try it there, if you really think it is the environment.


Report •

#16
April 20, 2013 at 14:25:39
I tried it on the other laptop. Forgot it had Open Office instead of Excel. Put the two files on a Stick and dragged the xls onto the vbs, got error line 4 character 1. If that is talking about the data, there are only 3 lines.

Report •

#17
April 20, 2013 at 14:39:30
Tried it on a third machine both drag and drop and cmd. No error in cmd, no files created in either mode. Drag & Drop gave error Line 18 character 9 (only 3 records) and said "File name or class name not found during Automation".

Report •

#18
April 20, 2013 at 18:49:46
Post #15 left me kind of confused... but in spite of my confusion, I think I know what's going on, maybe, since i got the same error that you listed when I tried to run it on a xlsx file (I hate those new fangled files!) You need to save the spreadsheet as xls, not xlsx. ("line 18" is referring to the script, not your input-file). vbscript can probably handle xlsx, but not the script as currently written. examining the value of variable "cell", when run on xlsx file, discovered that it's full of binary stuff. So that's point one: xls, NOT xlsx format.

point #2, you said "and without the directory bit in the command line." That is essential: cscript tts.vbs \dir1\dir2\blah\test.xls
NOT: cscript tts.vbs test.xls
The latter will NOT show an error because error-msg was disabled by this line of the script: "on error resume next"
If you remove that line from the script, you will see that the xls file could not be found (because you didn't include the "directory bit" preceding the xls filename).
I beleive these two points are what is causing the problem. Once you get past these two points, the rest would be easy to automate, for one or multiple xls files.


Report •

#19
April 20, 2013 at 19:35:15
Point 2. Since I had already changed directory to the directory that contained both files, I thought I would try it without the directory bit. I did test it both ways, with and without. With such a long directory name, it is easy to make a mistake.
I saved the file as a xls and tried it by drag and drop, and by command line after Changing directories into the one with the files, and WITH the directory structure ahead of the xls file name (one test, not two). No files were created. I can send you a picture of Windows explorer showing the two files, and the CMD window overlayed, if that is needed or possible.

Report •

#20
April 20, 2013 at 21:02:14
✔ Best Answer
Try this modified script (which eliminates the full-path requirement, and adds some debugging analysis):

vocal=0 'choices: 0,1,2 microsoft sam, mary, mike
Set voice = CreateObject("SAPI.SpVoice")
Set fStream = CreateObject("SAPI.SpFileStream")
Set fso = CreateObject("Scripting.FileSystemObject")
Set excel = CreateObject("Excel.Application")
Set wb = Nothing
set voices=voice.getvoices
set voice.voice=voices(vocal)
excel.DisplayAlerts = False
fStream.Format.Type = 34 ' valid range: 4-67 in win-xp

For Each arg In WScript.Arguments
fil=fso.getabsolutepathname(".")&"\"&arg
wscript.echo "xls: "&fil
If fso.FileExists(arg) Then
'disabled error-trapping on next line
' On Error Resume Next
Set wb = excel.Workbooks.Open(fil, False, False)
On Error GoTo 0
If Not wb Is Nothing Then
Set cell = wb.Sheets(1).Cells(1)
Do Until cell = ""
'debugging display
wscript.echo "cell (.wav filename):"&cell&".wav"
fStream.Open cell & ".wav", 3
Set voice.AudioOutputStream = fStream
set c=cell.offset(0,1)
do until c=""
voice.Speak c
set c=c.offset(0,1)
loop
fStream.Close
Set cell = cell.Offset(1, 0)
Loop
wb.Close
End If
End If
Next 'arg
excel.Quit : Set excel = Nothing
'==== end

save this as a new .vbs (tts2.vbs, f/e), then try the commandline experiment (now you don't need the fullpath, just the xls filename). (I don't know much drag/drop, therefore I don't trust it entirely, but that's just me.) Try it either way, and come back with the error message...
4-21: edited to allow multiple columns of speech, added voice sel.


Report •

#21
April 21, 2013 at 03:21:41
nbrane...
The short answer is, either I finally noticed that it was processing as if there were two files, TTS and Test.xls, as my file name was TTS Test.xls, which means it never was finding the file, or it was doing that every time, and I just didn't notice what it said. When I added an Underscore to the file... TTS_Test.xls and ran it again, it worked. Got the x, y, x, y, x, y, and three wav files. hooray. Also, before, it was not closing the file. If I tried opening Excel, and opening the file, it would say it was in use by something else. So I would have to re-boot to free up the file.

Thanks to all that helped. Apparently you can't have a filename with spaces in it. That is why it would run in your environment, but not mine, apparently.

I have some questions. I don't intend to have very long Text entries, excel has a limit of 255 characters, I think, but is there a limit on characters? Second, is there a limit on the number of lines I can have, currently the file with the most has about 150, but I can see that getting into the thousands. And lastly, is there any choices in Voices? The speaker is very low on my laptop, so I really can't hear the quality of the voice, but anything beats mine.

Again, I appreciate all that have helped.


Report •

#22
April 21, 2013 at 04:44:37
I am not sure what the speech portion does if it sees something in the record it can't deal with. Whether it skips it or truncates it. It would be helpful to return the column 1 (proposed name for the wav file), or the record number, if the record did not get written. Is there a document I can read that would tell me the rules for the text portion?Like what it has issues with, like dashes, apostrophe's, symbols, numbers, anything like that?

Report •

#23
April 21, 2013 at 06:29:44
I decided to do a realistic test. The files were created. But when I put them in my project, it choked. I am guessing that the wav files don't conform to:

PCM, 44.100 kHZ., 16 bit, Mono

Are there some switches that can set it to these wav parameters? Thanks.


Report •

#24
April 21, 2013 at 11:23:09
So it turns out the virtualized versions of Office (either ClickOnce or the download version of Home & Student) does not work with Interop, so my hands were tied until I could get on a PC with a traditional install.

My original version (and nbrane's rewrite) tried to write the .wav files to Window's System32 directory. UAC didn't like that, so the script crashed. This is for the best, because you don't want a bunch of .wav files cluttering up your system32. The workaround for this problem was to use the command line, as nbrane suggested. (It's also how I tested my script, which is why I didn't catch it.) This version should fix all that. Now drag and drop works correctly:

Set voice = CreateObject("SAPI.SpVoice")
Set fStream = CreateObject("SAPI.SpFileStream")
Set fso = CreateObject("Scripting.FileSystemObject")
Set excel = CreateObject("Excel.Application")
cd = fso.GetAbsolutePathName(WScript.ScriptFullName & "\..") & "\"
excel.DisplayAlerts = False
fStream.Format.Type = 34

For Each arg In WScript.Arguments
  Set wb = Nothing
  If fso.FileExists(arg) Then
    On Error Resume Next
      Set wb = excel.Workbooks.Open(arg, False, False)
    On Error GoTo 0
    If Not wb Is Nothing Then
      Set cell = wb.Sheets(1).Cells(1)
      Do Until cell = ""
        fStream.Open cd & cell & ".wav", 3
        Set voice.AudioOutputStream = fStream
        voice.Speak cell.Offset(0, 1)
        fStream.Close
        Set cell = cell.Offset(1, 0)
      Loop
      wb.Close
    End If
  End If
Next 'arg
excel.Quit : Set excel = Nothing

How To Ask Questions The Smart Way


Report •

#25
April 21, 2013 at 11:46:33
Now, on to the individual concerns.

nbrane: . . . but the argument needed the fully qualified path to the xls file.
We know it found the XLS file because it failed on line 18, well after it started using the spreadsheet. If it did fail to find the file, the script would probably silently fail, what with the If wb = Nothing check and all.

The great thing about scripting (and programming) is the ability to find out by asking the language itself.

For Each arg In WScript.Arguments
  WScript.Echo arg
Next 'arg
Now you can save that, then drag and drop some files on it, and see exactly what Explorer passes as arguments. For a fun time, drop 200+ files on it. Personally, I suggest you do this to someone else's PC, so you can wonder off when you get bored.

ww4cash: Apparently you can't have a filename with spaces in it.
You can if you drag and drop. Use the fixed version.

ww4cash: excel has a limit of 255 characters
Newer versions have a limit of 32,000 characters.

ww4cash: [I]s there a limit on characters? . . . [I]s there a limit on the number of lines?
If there is, I can't find it in the documentation. Narrator was intended to assist the sight-impaired people who use Windows, so it'd have to be designed to handle the largest of web pages. As for lines, your hard limit is the amount of hard drive space you have.

ww4cash: [I]s there any choices in Voices?
You'd have to buy them, I think. Look for voice packs compatible with Vista/Win7's narrator. You'll need to set the voice you want to use as the default, because this script uses the default voice.

ww4cash: I am not sure what the speech portion does if it sees something in the record it can't deal with.
It tries its hardest and moves on. Remember this was designed for people who can't read the screen. "I don't know how to pronounce this," and stopping half way though really isn't an option.

ww4cash: Is there a document I can read that would tell me the rules for the text portion?
I haven't seen one, but I haven't looked. I suggest using Google.

ww4cash: Are there some switches that can set it to these wav parameters?
The script sets the format type to 34, which is SAFT44kHz16BitMono. You can play around with the values yourself, the official list is here. Try 35, 36, and 37, and see if you get a version your program will like.

How To Ask Questions The Smart Way


Report •

#26
April 21, 2013 at 12:11:48
Razor, that one works. Hint for anybody following this, put your vbs and xls(x) on thumb drive, ad you will need to type the path. The rules are like this: both the VBS and the xls are better off in the same directory (root of the thumbdrive). Then type:
cscript NameOfVBS.vbs E:\NameOfXls.xls
Where E:\ is the root address of your thumb drive. If you run this from your hard drive you could make a mistake typing all that stuff in. Also, it seems that it doesn't like filenames with spaces in them. Look at me, suggesting stuff to others. I am the neophyte. Just trying to save others time....

Now, This WILL get me where I need to go, providing I can run the wav through a batch editor and convert it to MP3 and back to a WAV that meets "PCM, 44.100 kHZ., 16 bit, Mono", unless, someone can tell me how to do it in this code.

Other nice to have's would be if the code chokes on Text I provide, return the prospective filename. In other words if it chokes on column 2, return column 1 so I know which ones I will have to do by hand.

If anyone knows where I can read the RULES for Text to Speech so I can make sure I don't violate any of them in my Text, I would appreciate a reference to it.

I am grateful to all who have helped me. This will save me a lot of time no matter how it ends up.


Report •

#27
April 21, 2013 at 12:30:16
Suddenly, the Voices work in my project, whoopee !! 34 is the right code, as you said.

Sorry our messages are crossing each other.

Again, I appreciate what you and everyone else has done to help me. You don't know how much time this will save me and no-one will have to listen to this old man's voice. Thanks Razor.


Report •

#28
April 21, 2013 at 13:24:42
Good! I'm glad it worked! I did some tests with the "format" value, and determined that it can range from 4 to 67 (on my system), so a person could always just run through them until you hit one that works. (several worked on mine, with varying degrees of quality, using VLC player), or google for a table that lists them and their attributes.
Also, there are 3 voices included with win-xp, but I only found one on win-7. Maybe there's a way to "transplant" them from xp to 7, and as Razor mentioned, there may be some downloadable ones.
And finally, you can have those detestable spaces-in-filenames if you put the filename(s) in quotes.
Thanks for your post, because I learned some new tricks (and huge thanks to Razor for doing the heavy lifting on this one - I just took care of the light work.)
As for automation, there are several options and means, such as having the vbscript loop through all xls files existing in the directory, or selecting certain ones, or prompting for them using inputbox (so it prompts in a window instead of using the command-prompt).

Report •

#29
April 21, 2013 at 13:35:31
nbrane: google for a table that lists them and their attributes.
Well, I did post the link, so there's that. (I swear, no one reads my posts outside of the mono-spaced text.)

How To Ask Questions The Smart Way


Report •

#30
April 21, 2013 at 13:49:09
I thank everyone. You and Razor. I am a happy camper. I just built one of my projects, and it seems to work. Need to build it on another PC, one feature is acting up, but may be the program, not what you guys did. It is amazing how much work this will do, and how much work this will save me, in so few lines of Code. I went to College in the 60's and again in the 70's, and remember dragging boxes of Cards around. Over a foot of 80 column Cards. Cobal was a real hog in terms of number of lines of code. Fortran was better, cardwise. I haven't done any programming since. So you guys amaze me.

Report •

#31
April 21, 2013 at 15:06:42
What is the name of the voice in Windows 7 and its extension, so I will know what to look for.

Report •

#32
April 21, 2013 at 17:57:50
"Microsoft Anna" is M1033DSK (registry under hklm\soft\mic\speech\voices). Path is:
C:\PROGRA~1\COMMON~1\SpeechEngines\Microsoft\TTS20\en-US\enu-dsk
composed of 9 M1033DSK.nnn files with various extensions.

I also got to experience the punch-card "trip", in 1978 at Wooster. Thank God we weren't afflicted with Cobol! (I got that "joy" later, in the mid 80s) We lucked out with Pascal, which I liked and still do. We had to wait for available keypunch, then punch our cards, then give them to the lab-slave to queue up, then wait till our turn finally came for the run, only then to be rewarded with about a hundred errors printed on the lineprinter hardcopy. My card stacks were only about 2 to 3 inches of cards, and I kept them, but now they're gone i don't know where.

@Razor: Yeh, I saw that, but it didn't look like a link, so it didn't occur to me to roll my mouse over it. I'm deficient in common sense, among other things.


Report •

#33
April 21, 2013 at 18:12:35
We had a machine that would punch sequential numbers in 72-80 in the cards, and another that would sort them back in order in case we dropped them. I remember dropping off the cards, picking them up later, then even later picking up the error reports, those were the days. Are we getting soft?

The software I am running this stuff through will show the upper level data, but not each record. I think the issue is in the header. Is there any way to compare headers and modify the code to deal with that? The wavs I create on my Android, work fine. These do too, actually they do play in the final product. So I should be happy with that, I guess. But if something simple will let me review each record, of which the wav is a part, that would be better.
I tried to get to the lower level data on another machine, and it would not even let the program load the data.
Could do what I suggested earlier, and see if I can find a batch sound file converter, and change them to MP3 and back to WAV and see if that clears up the header issue. The header may not be the issue, but that is my best guess.


Report •

#34
April 21, 2013 at 18:31:24
I pulled one of the wave files into Audacity and it said the file was 32 bit, not 16. That may be the issue. The 34 code says it is 16 bit, mono 44k pcm, but maybe it isn't. I may have to play with that number and check the results in Audacity and until I get the right parameters. Let me check an Android file and see what it thinks it is. bb in a minute.
It thinks an Android file is the same...Mono, 44100Hz 32-bit float. That is exactly what the file created with the cscript said it was. Hmmm. Not sure where I check for PCM. Ok, Float and PCM are different, apparently. But, I don't understand why my Android generated files that Audacity say have the same parameters and the cscript files, and one does not choke my intermediate program and the others seem to. The only parameter I have control of in the Android App is the Sample Rate 44100Hz. Maybe I need to look at the two different files in a different APP to see what the parameters say....

Report •

#35
April 21, 2013 at 19:08:00
Geez, I feel like I am playing Wack-A-Mole here. I changed the test wav files to 16 bit PCM, and got the same results in my intermediate program. So the Wavs created with the script may not be the problem. I gotta do some more research. Ill get back to you.

Report •

#36
April 21, 2013 at 19:09:00
I used GSpot to get the statistics on a generated wav file. It reports, "44100Hz 706 kb/s (1 chnl)". 44100 * 16 = 705600, so maybe Audacity is upscaling it when it opens the file?

How To Ask Questions The Smart Way


Report •

#37
April 21, 2013 at 19:25:24
Is your win-7 32-bit or 64? don't know if this applies, i just know i personally don't deal well with 64-bit. I just can't imagine msdn standard being "wrong" (16 vs 32 bit PCM).

Report •

#38
April 22, 2013 at 03:04:38
64 bit. Gotta help a friend this AM will try to sort out what my intermediate program doesn't like. I made a change to the order the data is presented, before this, and that may have something to do with it.

Report •

Ask Question