mkusa Report post Posted 09/23/2003 06:46 AM Hi, I'm trying to build a script that reads the exchange rates from an Oracle 8i database. I was able to achieve the second part (Reading the exchange rates) but I was unable to read them out due to large number of items returned from the query. Can u help me with this problem ? please keep in mind that I need to speak out Currency Name (USD,GBP..etc) then how much it sells at and how much it buys for regular customers and how much it sells at and how much it buys for VIP customers. Your help is highly appreciated. Musaed mkusa505_yahoo.com Share this post Link to post
SupportTeam Report post Posted 09/23/2003 08:42 AM but I was unable to read them out due to large number of items returned from the query. Is the problem that you are unable to write the SQL query in such a way that only the items you need will be returned? I need to speak out Currency Name (USD,GBP..etc) then how much it sells at and how much it buys for regular customers and how much it sells at and how much it buys for VIP customers. Sounds like you only need to retrieve 5 bits of information - this should be quite straightforward... Can you please give us more information on what the problem is, and maybe post the script which is currently used. Share this post Link to post
Guest Musaed Report post Posted 09/23/2003 10:59 AM Sorry for the confusion. The SQL I wrote returns all the Currencies correctly, but the problem is I don't know how to build the script that reads each one of the currency along with its Sell and buy rates. I can't hardcode the currencies within the script because the rates might be removed at anytime. One solution I thought about is to write an Evaluation function that examine each return value from the query but then I found out that I need to add too many Play events !! can I for example do a nested loop that looks like this: for i = 1 to No_of_Currencies select case Currency case "USD": Play USD_Currency,SellRate1,BuyRate1,SellRate2,BuyRate2 case "EUR": Play USD_Currency,SellRate1,BuyRate1,SellRate2,BuyRate2 . . etc end select next i baring-in-mind that SellRate1,BuyRate1,SellRate2,BuyRate2 are numeric (so can I use Text-to-Speech ?) I hope the picture is clear now.. mkusa505@yahoo.com Share this post Link to post
SupportTeam Report post Posted 09/23/2003 01:49 PM Does this application need to play all the currencies one after another, or just the currency chosen by the caller? Using Text-To-Speech for this application would make things a lot easier - the retrieved information would just have to be played one RV after another... To create this app without using a TTS the sound files for each currency would need to be recorded: USD.WAV, EUR.WAV etc (or whatever the currency code is stored in the database) and then the information can be played using a number of "Say Number" modules. Share this post Link to post
SupportTeam Report post Posted 09/24/2003 02:23 AM If a large number of currencies needs to be read out then a simple loop which cycles through all the retrieved database rows can be set up - this loop would consist of a couple of Evaluate Expression Modules which would increment the counter and test for end of data, and four "Say Numbers" modules to play the exchange rate information... Share this post Link to post
Guest Musaed Report post Posted 09/24/2003 04:45 AM Does this application need to play all the currencies one after another, or just the currency chosen by the caller? The application should play the currencies one after the other. I already have the USD.WAV, EUR.WAV..etc Can u give me a jump-start on how to start the code using the Evaluate function along with Say Number module ? Many Thanx, Musaed Share this post Link to post
SupportTeam Report post Posted 09/25/2003 01:12 AM The attached script lays out how the system can be created - the entire system uses about a dozen modules... It shows mainly how the Result Variables should be used to create a loop which speaks all of the information. ExchangeRateInfo.vgs Share this post Link to post
Guest Musaed Report post Posted 09/25/2003 08:42 PM Exactly what I need. Thanx a million. Thats why Voice Guide is the best Share this post Link to post
SupportTeam Report post Posted 09/26/2003 02:57 AM Another user just reported that there is a bug in v5.0 which prevents this script from working well (v5.0 cannot do nested Result Variables - for more info see here). This issue will be resolved in the soon to be released v5.1 Beta3. You can for now download and use v4.9 of VoiceGuide : ftp://ftp.katalina.com.au/VgTapi_4.9.0.exe The script will work OK in v4.9 Share this post Link to post
Guest alok@siplnet.com Report post Posted 04/29/2005 01:10 PM Thanks, I was so confused with this as I was evaluating the software. And was thinking of going to some other company software. Example looks great. I hope this works in the latest version of software. Share this post Link to post
SupportTeam Report post Posted 04/29/2005 02:28 PM A specific situation for nested RVs had a bug which was fixed in this update: http://voiceguide.com/forums/index.php?showtopic=2745 Share this post Link to post