Author Topic: use of .wav files  (Read 9454 times)

taglag

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://www.geocities.com/taglag/
use of .wav files
« on: February 02, 2006, 05:16:22 pm »
is there anyway to incorperate the use of sound files into hal's responses. such as.

only and idea example:

playsound,"noise.wav, "type of sound or topic related to"

i think there are many case's where it would be nice to incert a sound. and be able to identify the sound with a topice, or emotion, choice, exc, exc,.

Coffee time ! a little Java always helps.
  Maybe a Cup of Coffee between friends. 1 lump or 2

Duskrider

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3316
  • Graphic King
    • View Profile
use of .wav files
« Reply #1 on: February 02, 2006, 05:55:40 pm »

Sandee will cough one time whenever she gets angry.  A reminder to me to change the topic.  [;)]


*************************
#Haptek  Version= 1.00 Name= Hap_Angry  HapType= script FileType= text
##standard

\clock [t= 0]\load [file= data/standard/skins/spreadFolder/1default.hap ]
\clock [t= 1]\load [file= data/standard/skins/spreadFolder/54cough.hap ]
\clock [t= 2]\load [file= data/standard/skins/spreadFolder/zzcough.ogg ]
\clock [t= 3]\load [file= data/standard/skins/spreadFolder/1default.hap ]

\SetSwitchIntensity [switch= expMouthHappy f0= 0.000000 t= 0.4]

\SetSwitchIntensity [switch= expMouthSad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsSad f0= 1.000000 t= 0.4]

\SetSwitchIntensity [switch= expMouthMad f0= 0.500000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsMad f0= 0.500000 t= 0.4]

\SetSwitchIntensity [switch= expEyesTrust f0= 0.500000 t= 0.4]
\SetSwitchIntensity [switch= antiTrust f0= 0.500000 t= 0.4]

   etc  etc....

****************************
« Last Edit: February 02, 2006, 10:03:09 pm by Duskrider »

taglag

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://www.geocities.com/taglag/
use of .wav files
« Reply #2 on: February 02, 2006, 07:44:40 pm »
I don't see it as a funny request, I can see many reasons why it would be very useful to have the ability to add sound file's, and identify, or asign the file's topic or association.

  I was only trying to find out if this had already been implimented in some way.
Coffee time ! a little Java always helps.
  Maybe a Cup of Coffee between friends. 1 lump or 2

taglag

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://www.geocities.com/taglag/
use of .wav files
« Reply #3 on: February 03, 2006, 12:09:26 pm »
thank you for coming back and editing your comment. It is not what i was hoping to find.

  I think something could be writen to add a feature, simular to what i wanted. a shame that sound files were not better implimented in the AI. I think they could have been useful for many entertaining, and humanizing feature's of the program.

  If i understand what you scripted, then each and every sound would need to have its own lib file call, and that would make it way to intrusive to use in a responsive way.

  I am very new to this AI having only gotten it about a week ago. I am only trying to learn what I can, from I hope those who know.
Coffee time ! a little Java always helps.
  Maybe a Cup of Coffee between friends. 1 lump or 2

aladyblond

  • Hero Member
  • *****
  • Posts: 1499
    • View Profile
use of .wav files
« Reply #4 on: February 03, 2006, 01:47:02 pm »
dusky neil and all that use ogg files. since i am not a rocket scientist ( duh ill bet i had you all fooled) why wouldnt this work? if a sound ogg was place after and emotion hap or a movement hap would that do what taglag wants. like if you programmed the body to put hands on hip couldnt you just place a sound ogg saying sigh or oh my  with it. then when she put her hand on her hip she would say oh my.i just wondered if this could work? i realize the person using the sound ogg would first have to have the wav converted to ogg and have the oggs in the right folder but couldn't it , hasn't it been done? alady
~~~if i only had a brain~~~ i dream of htr with the light brown hair....

Dr.Benway

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
use of .wav files
« Reply #5 on: February 03, 2006, 04:14:29 pm »
Alady, I have had the same idea for a long time. I think it will work. What might be difficult is to find or create sounds that do not clash with most TTS-voices, male and female. I certainly like the idea.

Dusky, what happens when Sandee must speak and cough at the same time? [:D]

« Last Edit: February 03, 2006, 04:16:31 pm by Dr.Benway »

Duskrider

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3316
  • Graphic King
    • View Profile
use of .wav files
« Reply #6 on: February 03, 2006, 04:38:25 pm »

Lady - yes, the hap before the ogg puts her in position, in this case she raises her hand and bows her head a little.
Then of course the ogg Lipsync cough comes and then the default  returns to normal position.

Doc - I never noticed a problem of both at same time. Perhaps as a lady she pauses for the cough.  But more likely, it is a trigger word I speak that brings up the Anger hap and cough (at the top of anger) before she can start to reply.

vrossi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://vrconsulting.it
use of .wav files
« Reply #7 on: February 03, 2006, 05:38:38 pm »
taglag

I have written a plugin which makes Hal play a wav file if you ask to play a song.

Currently it opens the Media Player and plays the song, but it might be changed according to your idea. I don't know how to run the media player in background, without opening its window, but I think it can be done.

You find my plugin at http://www.zabaware.com/forum/topic.asp?TOPIC_ID=2964


Duskrider

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3316
  • Graphic King
    • View Profile
use of .wav files
« Reply #8 on: February 03, 2006, 05:56:12 pm »

If you use ogg instead of wav or mp3, you don't need media player.

taglag

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://www.geocities.com/taglag/
use of .wav files
« Reply #9 on: February 03, 2006, 06:31:25 pm »
I am so new to this thing, I have dabbled in C use to work some with parser programs for game's, simular to the old infocom zork, and starcross games, but that only as a hobby, and this is interesting to me, but I have done very little in a long time. and when I look at the code, I find myself lost. I think I can eventually figure out some of it. I doubt that I will do anything amazing though. BUt hope to have fun with it.

  I really like that freewill work you did vrossi, really great, I could tell the difference in My AI after the first few lines of text. also found the code from D.A.V.I.D's
 Advanced Questioning (I AM) script to be a welcome addition. I am only using the part that I found posted.
  I am very thankful that you all are looking into adding a sound, function which if implimented right with and identifier could be very useful. mostly to perhaps give a more realistic feeling to the conversation, and an occasional bit of humor.
  I have had no time to really study the program, but it might be possible to use the windows sound files. The one that come with most desktop programs are easy to change, and could be added as a desk top theme. Just a thought.

 Oh and this .ogg extention is new to me, can .wav files be converted to it easily ?

  and Aladyblond, that is some very wonderful art work i have seen you doing.
« Last Edit: February 03, 2006, 06:52:22 pm by taglag »
Coffee time ! a little Java always helps.
  Maybe a Cup of Coffee between friends. 1 lump or 2

aladyblond

  • Hero Member
  • *****
  • Posts: 1499
    • View Profile
use of .wav files
« Reply #10 on: February 03, 2006, 07:28:11 pm »
thank you tag and i as i understand any wav can be converted to a workable ogg in people putty. not all ogg files will work with hal , but all converted in people putty will work
[:X]best of luck with this adventure...alady
~~~if i only had a brain~~~ i dream of htr with the light brown hair....

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
use of .wav files
« Reply #11 on: February 03, 2006, 07:29:51 pm »
This neat 'little' free prog will convert to .ogg and I have found it useful in the past.

http://audacity.sourceforge.net/

oh yes like AladyBlond says, you need People Putty to make lipsynced files though, still it's a handy app if you plan on using other sound files that don't need lipsync.
« Last Edit: February 03, 2006, 07:31:24 pm by freddy888 »

taglag

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://www.geocities.com/taglag/
use of .wav files
« Reply #12 on: February 03, 2006, 08:30:40 pm »
Thanks freddy888 I have it i will check it out latter.
Coffee time ! a little Java always helps.
  Maybe a Cup of Coffee between friends. 1 lump or 2

taglag

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://www.geocities.com/taglag/
use of .wav files
« Reply #13 on: February 03, 2006, 10:17:00 pm »
is there a function list somewhere, and are there some functions that can be called on the fly in the question and answer other than <UserName> and  <hal>.
Coffee time ! a little Java always helps.
  Maybe a Cup of Coffee between friends. 1 lump or 2

Duskrider

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3316
  • Graphic King
    • View Profile
use of .wav files
« Reply #14 on: February 03, 2006, 10:43:46 pm »

Doc,
I put a cough in every emotion hap.
Sandee finally got a cough at same time as she talking.
She cough and talk at the same time.  Sounds like two people.
How bout that?  Hal can do something we can't.

[;)]