 |
|
|
|
|
|
|
 |
08-26-2008, 05:51 PM
|
#1
|
|
Guest
|
An interesting challenge
Hi all,
I have an interesting challenge for everyone. I wonder if there is any way to
accomplish the following in director:
I have a field in which I copy the following script (different everytime but
with the same tags)
Hi <anim1=test1> my name is giannis. How are you today<anim2=test2>.
A TTS engine should read this text and extract automatically a textfile that
should be saved somwhere in the c drive with the following format:
\clock [t= X] \load [Playanimation = Y]
\clock [t= Z] \load [Playanimation = W]
X is where the TTS encountered anim1 (e.g., 0.1 seconds)
Y should be the name of the animation that is only part of the anim1 tags
Z should be the time where the TTS encounter anim2 (e.g., 0.4 seconds)
W should be the name of the animation that is only part of anim2 tags
Is that possible using director? please let me know with relevant Lingo
examples
|
|
|
|
08-27-2008, 09:44 AM
|
#2
|
|
Guest
|
Re: An interesting challenge
any ideas?
|
|
|
|
08-28-2008, 12:30 AM
|
#3
|
|
Guest
|
Re: An interesting challenge
if you're using MX2004 then use Javascript's built-in regular expressions - or
use the http://openxtras.org/pregex/, otherwise.
are you looking for help in writing the regular expressions that would find
the relevant tags?... or for general help in coding what you've done a great
job in outlining?
|
|
|
|
08-28-2008, 01:00 AM
|
#4
|
|
Guest
|
Re: An interesting challenge
Well, some examples would be usefull if you have anything in mind. Its a
complex problem. I can use regular expressions fine, but there are a lot of
problems:
1) How do I make the TTS engine to query the time once it will encounter the
specific tag and automatically write it to a file with a specific format?
2) How do i make the TTS engine to ignore these tags from speaking? I have
been searching for hours but I can nseem to find any answers to these two
questions.
Any ideas? I am completely lost with this!
|
|
|
|
08-28-2008, 02:24 AM
|
#5
|
|
Guest
|
Re: An interesting challenge
Yanni,
I doubt that anyone who can provide the help you ask finds this to be an
'interesting challenge'.
This forum may have various purposes, but writing (lengthy) scripts for
specific tasks upon request is not one of them.
Regards,
alchemist.
"wgb14" <webforumsuser@macromedia.com> wrote in message
news:g957sd$jik$1@forums.macromedia.com...
> Well, some examples would be usefull if you have anything in mind. Its a
> complex problem. I can use regular expressions fine, but there are a lot
> of
> problems:
>
> 1) How do I make the TTS engine to query the time once it will encounter
> the
> specific tag and automatically write it to a file with a specific format?
>
> 2) How do i make the TTS engine to ignore these tags from speaking? I have
> been searching for hours but I can nseem to find any answers to these two
> questions.
>
> Any ideas? I am completely lost with this!
>
|
|
|
|
08-28-2008, 11:02 AM
|
#6
|
|
Guest
|
Re: An interesting challenge
"This forum may have various purposes, but writing (lengthy) scripts for
specific tasks upon request is not one of them."
I am not asking for complete scripts. I am sorry if this is not clear in my
posting. All I want is some general advice/guidelines on how to approach this,
and IF you know any relevant examples/scripts.
By the way, I have created a dll where you can add face detection in director
games. If you want it, it is here
http://aidreams.co.uk/forum/index.php?topic=2294.0
|
|
|
|
08-28-2008, 12:01 PM
|
#7
|
|
Guest
|
Re: An interesting challenge
> IF you know any relevant examples/scripts.
What you asked was far too specialized for an example to exists.
Try breaking your question in parts.
E.g.
Q1: I have the string: "Hi <anim1=test1> my name is giannis. How are you
today<anim2=test2>"
How can I generate from it a list like [ #text:"HI", #anim:"test1",
#text:"my name is giannis. How are you today", #anim:"test2" ]
Q2 How can I save a given string to a file?
etc...
That way, you will get exact answers and most probably examples. Many list
members are willing to write examples as answers to such questions.
It's good that you find your project interesting. In an ideal world, that's
how it should always be. However, don't expect that others will necessarily
share the same interest.
> By the way, I have created a dll where you can add face detection in
> director
> games. If you want it, it is here
Wouldn't you prefer to do it yourself? That tool I told you about is now
operational, but not to be publically announced yet. Mail me to send you a
copy you can try.
"wgb14" <webforumsuser@macromedia.com> wrote in message
news:g96b6j$r0d$1@forums.macromedia.com...
> "This forum may have various purposes, but writing (lengthy) scripts for
> specific tasks upon request is not one of them."
>
> I am not asking for complete scripts. I am sorry if this is not clear in
> my
> posting. All I want is some general advice/guidelines on how to approach
> this,
> and IF you know any relevant examples/scripts.
>
> By the way, I have created a dll where you can add face detection in
> director
> games. If you want it, it is here
>
> http://aidreams.co.uk/forum/index.php?topic=2294.0
>
>
>
>
>
|
|
|
|
08-28-2008, 01:25 PM
|
#8
|
|
Guest
|
Re: Script parser
<<Try breaking your question in parts.>>
I am not sure if this question can be broken in parts but the steps could be
as follows (let me know if you have anything to add)
1) Somehow I will have to program my custom tags into the TTS and inteface
them with Director.
2) Create a rule to test the tags encountered by the TTS. If the tag is
<anim1=test1>, then query the timer and save the time instance.
3) Break down the string using regular expressions ( anim1,test1) and write
the following in the script file:
\clock [t= X] \load [Playanimation = Y]
x is the time instance and y is the name of the animation (i.e., test1)
3) If the tag is animation2 then repeat the same process but write the
following lines in the script file
\clock [t= X] \load [Playanimation2 = Y]
Continoue the same process untill no more tags are encountered. Meanwhile the
engine should also save a wav file of the text as well as extracting the tags
from the text in a seperate file. This part is not a really big problem. If I
can get some hints on the first part i should be able to figure out the rest.
<<Wouldn't you prefer to do it yourself? That tool I told you about is now
operational, but not to be publically announced yet. Mail me to send you a
copy you can try.>>
Thats whay I am saying, the dll is ready and you can download it from that
URL. It acts as an activex control so you can easily use it in director. If
someone is willing to convert it to an xtra please email me for the source
code. As for your xtra yes i will email you, failure of director to access dll
has always been a massive problem.
|
|
|
|
08-28-2008, 02:10 PM
|
#9
|
|
Guest
|
Re: Script parser
Still too much info.
Leaving out the tts part, is parsing a string what you are asking, or what?
If so, you could use something like:
str="blah1 <anim1> blah2 <anim2> blah3"
myList=[:]
repeat while 1
tagbgn=offset("<", str)
if tagbgn=0 then
if str.length then myList.addprop(#t, str)
exit repeat
end if
if tagbgn>1 then
myList.addprop(#t, str.char[1..tagbgn-1])
put empty into str.char[1..tagbgn]
end if
tagend=offset(">", str)
myList.addprop(#a, str.char[1..tagend-1])
put empty into str.char[1..tagend]
end repeat
put myList
-- [#t: "blah1 ", #a: "anim1", #t: " blah2 ", #a: "anim2", #t: " blah3"]
> Thats whay I am saying, the dll is ready and you can download it from that
> URL
And what I was saying is that you could mail me if you wanted to use it in
director.
"wgb14" <webforumsuser@macromedia.com> wrote in message
news:g96jid$6o8$1@forums.macromedia.com...
> <<Try breaking your question in parts.>>
>
> I am not sure if this question can be broken in parts but the steps could
> be
> as follows (let me know if you have anything to add)
>
> 1) Somehow I will have to program my custom tags into the TTS and inteface
> them with Director.
> 2) Create a rule to test the tags encountered by the TTS. If the tag is
> <anim1=test1>, then query the timer and save the time instance.
> 3) Break down the string using regular expressions ( anim1,test1) and
> write
> the following in the script file:
>
> \clock [t= X] \load [Playanimation = Y]
>
> x is the time instance and y is the name of the animation (i.e., test1)
>
> 3) If the tag is animation2 then repeat the same process but write the
> following lines in the script file
>
>
> \clock [t= X] \load [Playanimation2 = Y]
>
> Continoue the same process untill no more tags are encountered. Meanwhile
> the
> engine should also save a wav file of the text as well as extracting the
> tags
> from the text in a seperate file. This part is not a really big problem.
> If I
> can get some hints on the first part i should be able to figure out the
> rest.
>
> <<Wouldn't you prefer to do it yourself? That tool I told you about is now
> operational, but not to be publically announced yet. Mail me to send you a
> copy you can try.>>
>
> Thats whay I am saying, the dll is ready and you can download it from that
> URL. It acts as an activex control so you can easily use it in director.
> If
> someone is willing to convert it to an xtra please email me for the source
> code. As for your xtra yes i will email you, failure of director to access
> dll
> has always been a massive problem.
>
>
|
|
|
|
08-28-2008, 09:21 PM
|
#10
|
|
Guest
|
Re: Script parser
Yes, this is what I was looking for. However, there is still too much work to do in the TTS part that can be done only VB.NET.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Adobe Newsgroups | Software Newsgroups
Powered by: vBulletin Version 3.0.7 Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2003-2004 All Rights Reserved GroupBrowser LLC.
|
 |