Community Forums Archive

Go Back

Subject:Newbee Question on SoundForge Script Capabili
Posted by: Paul A
Date:2/4/2006 8:51:52 PM

I am a complete newbee to Sound Forge and it's scripting feature. I am reading the V8 manual and just starting to try things with the program. We have V7 and I downloaded the trial version of V8. I am asking here to find out if I am completely off base or if my idea is possible.

I need to create many versions of a basically identical message. It will only differ in the details of a 9 or 10 word phrase that is repeated two or more times at various points in the message.

What I want to do is have a group (array?) of audio files and an automatic way of assembling them into unique messages bassed on user input, preferable in the form of a text file. The audio files would have several (one to ten) common segments that are in all the messages in the same order/positions. In between those constant segments would be changable sections that would be a series of one word or short phrase audio files. There would be about eight of these short files that would be spliced into the message between each of the constant segments and they would be chosen from a table of about 80 entries according to the user's input for that individual message (text string?). The table could be in the form of a 2D array (8X10) or just 80 individual files.

The lengths of the common files would vary from a few seconds to as much as a minute or more. The 80 shorter files would be either one word of a 3-4 word phrase but the lengths could vary somewhat as the several choices for each position would not be the same length.

I want a very, VERY natural sound that the average listener and even most professional listeners will not be able to tell apart from a single, complete reading of any of the final messages. I think that a short fade between the words would be appropriate but I am not sure exactly how long. I may need to experiment.

Once I have that working, I may want another script that would aid in disassembling several original messages into the 80 plus files I have described above. These messages would be written to include all the words and phrases needed in the array as well as the constant sections. An operator would need to mark each word, phrase, or longer segment and it would then be placed into a file for use by the first script. This task is not as frequent as the one above but may also benefit from using a script.

Each "client" will need a different message and the complete set of 80 shorter files. Since there will be multiple versions of this set of files, there will need to be a way of choosing which one the first script uses. Perhaps using the directory structure. An overall directory for the files for a particular set of messages (for a "client") and standardized file and/or directory names within those directories for the actual files. Thus the first script could be set up to use one of the "client" folders and all addressing below that level would be standard.

It seems to me that Sound Forge with scripting may be a way of doing this. Am I correct or completely off base? If it won't work, I will need to seek another solution.


Subject:RE: Newbee Question on SoundForge Script Capa
Reply by: _TJ
Date:2/4/2006 10:03:07 PM

You can do all of this with Sound Forge Scripting.

For the first part, you can read a text file, or prompt the user to generate the phrase, then use a sequence of file.OverWriteAudio() and/or file.MixAudio() calls to build up the output file. If you need to fade file.DoEffect("FadeIn",...) or file.DoEffect("FadeOut",...) do this trick.

For the second part. You can use .NET forms to create a UI that prompts the user to a sequence of choices. Or you could have the user create markers and then run a script that creates your segment files using the markers as guides. How much work this is depends a lot on how complex the task is and how much you want to hold the users hand. In Sound Forge It's a single command to save a part of a file as a new file. Al of the complexity comes in deciding WHAT part, and in what you are going to call it when you save it.

For someone who can already write Java Script or is conversant in some other scripting environment, this will be easy. If you are also learning scripting at the same time, be prepared for this to take several weeks to get done.

By the way, what the script can't do is help you decide how far apart to space the words to make them sound natural. You are on your own for that. But the primatives are there so that you can paste or overlap as you see fit.

Your task seems to be a bit similar to that discussed in detail in the DESPARATELY NEED HELP thread.

tj

Message last edited on2/4/2006 10:04:30 PM by_TJ.
Subject:RE: Newbee Question on SoundForge Script Capa
Reply by: Paul A
Date:2/5/2006 4:45:19 PM

TJ,

Thanks, I didn't really expect an answer on Sunday. I guess SoundForge is my answer.

I did start reading the DESPARATELY NEED HELP thread and it did sound a bit like what I want. I will finish it and perhaps print it out.

For my orientation, is the scripting language based on Java, .NET, or some other language? Or is it just on it's own like one of the macro languages?

Learn Sound Forge, learn scripting, etc. I have a lot of reading to do so I will disappear for a week or so.

Thanks,

Paul A.

Subject:RE: Newbee Question on SoundForge Script Capa
Reply by: jetdv
Date:2/5/2006 6:19:28 PM

The scripting engine uses .NET. There is a scripting API for Sound Forge here:
http://www.sonymediasoftware.com/download/step2.asp?DID=591

For scripting, you can use JScript or C# or other .NET languages. C# in Visual Studio 2003 works very well and makes creation of the GUI a breeze. Just compile to a .dll file!

Subject:RE: Newbee Question on SoundForge Script Capa
Reply by: _TJ
Date:2/5/2006 9:45:22 PM

For my orientation, is the scripting language based on Java, .NET, or some other language?
It's based on .NET
I typically use C# as the language to write scripts in. But you can use JScript.NET or VB.NET also. (There are a few things that are awkward to do in VB due to the fact that that language doesn't understand unsigned types, but there are ways to work around those problems if you prefer VB).

tj

Subject:RE: Newbee Question on SoundForge Script Capa
Reply by: Paul A
Date:2/6/2006 12:26:03 PM

Great! Thanks for the basic orientation. I am somewhat familiar with VB and only a bit with C#. I need to talk with my IS guy for his recomendation. And, like I said, I have a lot of reading to do. I feel like I am at the base of Mt. Everest and need to cross the peak and then back down the OTHER side.

Paul A.

Subject:RE: Newbee Question on SoundForge Script Capa
Reply by: _TJ
Date:2/6/2006 12:46:40 PM

If it helps you decide - most of the sample code is in C#, and nearly all of the code posted on this forum is C#.

or, to put it another way - I recommend you choose C# (grin)

Go Back