Announcement

Collapse
No announcement yet.

Concatenate Wav Files for Homeseer speaking

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Concatenate Wav Files for Homeseer speaking

    Hi,
    I'm searching for a method to quicly concatenate smalls wav files and play the result (both in realtime) via HS script so as to make my own and "TTS engine".
    Since, the french TTS engines are very fews and not very realistics (i don't want to pay a lot of money for a professional one), i would like to concatenate smalls wav files(each file stand for a single word) so as to make short and simple sentences that would sounds more realistics...
    Any ideas...?
    Thanks

    #2
    Why not just use the TTS. It works very well and you dont have to listen to your voice all the time. It sounds better with TTS as it sounds like it comes from the system rather than a recording. but if you must just use the events to play wave files or right a script to play the wave files

    ie..

    sub main()

    Dim Folder, TextStream, SoundFiles
    dim i, j, k

    SoundFiles=hs.getapppath+"\WAVE FILES\"

    'need following line to release playlist to be overwritten
    hs.MEDIAFilename=SoundFiles+"Hi.WAV"

    Set Folder = CreateObject("Scripting.FileSystemObject")
    Set TextStream = Folder.CreateTextFile(PlayList+"SayIt.m3u", True)

    TextStream.Write(SoundFiles+"Welcome Home.WAV")
    TextStream.Write(SoundFiles+"While You Were Out.WAV")
    TextStream.Write(SoundFiles+"You have vouce mail.WAV")
    'Etc
    'Etc
    'Etc
    TextStream.WriteBlankLines(1)
    TextStream.Close

    hs.MEDIAFilename=SoundFiles+"SayIt.m3u"
    hs.MEDIAPlay


    end sub


    Not perfect but you get the idea

    Comment


      #3
      Thanks Andrew,
      Well, I don't know about the englishs TTS but the french one(the only one you can have for free, others are quite expensives)doesn't sounds realistc at all.
      On the other hand, i noticed that my needs for HS speaking usually deals with a small dictionnary of 30-40 words.
      My idea is to record each word of this small ditionnary and make sentences by appending thoses words with scripts to accomplish my needs.
      I can transform my voice records by using appropriate software like AV VCS so as to get more realistic sentences (ie women voice with some hall effects) than the "robotic" french can offer me...
      My fear is that the concatenation operations will produce somes noisy artifacts.
      Whereas, thanks again andrew for the tip, i'll get you informed...

      Comment


        #4
        By the way, if there are french users here that uses HS with a realistic french TTS engine, just tell me...

        Comment


          #5

          You are welcome...

          Hay I thought that French only had about 30 words So you should be set. LOL

          Couldent resist. but It all sounds like Greek to me.

          Andrew

          Comment


            #6
            Yeah, no more than 30 words in french...!
            So easy to remember that i can save place in my brain to learn another language like english and speak with you...
            By the way,can you speak french with me...?!

            To be a litlle more serious i've get an error when i ran your script (modified with my settings, of course).
            I get this error when i try to append more than one wav file into the sayit.m3u file.(with only one file, all is ok).
            I don't know why..!
            The error said something like : "-21434242 automation error" when parsing the hs.MEDIAPlay command.
            ?!?

            Comment


              #7
              I use a Shareware product called 'wave flow'. It allows you to cut, paste and do all sorts of other things to wave files. I used it to convert reel to reel tapes of the band I was in 35 years ago to CD's, but now I use it to customize wave files for HomeSeer. It is a good product for a small price.
              http://www.waveflow.com/

              Comment


                #8
                My brain is full of english and i gave you the incorrect script information..

                The playList feature will not play wave files
                if you convert your wav files to mp3 it will work

                Comment


                  #9
                  Or if you just want to play wave files
                  you could do somthing like this


                  Sub Main()
                  dim a
                  a=1
                  if a = 1 then
                  hs.MEDIAFilename="C:\Program files\HomeSeer\Sounds\Ring Sounds\sayit1.wav"
                  hs.MEDIAplay
                  do while hs.mediaisplaying
                  hs.waitevents
                  loop
                  a = 2
                  end if

                  if a = 2 then
                  hs.MEDIAFilename="C:\Program files\HomeSeer\Sounds\Ring Sounds\sayit2.wav"
                  hs.MEDIAplay
                  do while hs.mediaisplaying
                  hs.waitevents
                  loop
                  end if

                  end sub

                  This will play WAV files Playlists, MP3's etc..

                  Comment


                    #10
                    There is a format to WAV files such that you simply cannot concatenated WAV files together and expect it to work. You need some software intelligence that can concatenated the files and write new file information at the same time, so a program that you can run from the command line is going to be your best bet for concatenating stuff on the fly. I too think that having multiple WAV files played in close succession will accomplish the same thing, and with HomeSeer's scripting interface you can accomplish this given a phrase to speak that you break apart.

                    The reason that the concatenated speech engines are so expensive are two-fold: 1. There is a lot of work in the Grapheme to Phoneme engine - that which can tell that "St." is an abbreviation for Saint or Street, and then using the rest of the sentence as a context be able to figure out which one to use and 2. Putting the WAV audio into a database so that it does not have to have the file format information and the WAV audio data can be quickly pulled from the database to be concatenated and sent to the audio output device.

                    Using your own voice recordings for routine announcements is the best way to go, but alas I fear you will have to keep using some sort of TTS engine for ad-hoc speaking (e.g. text you are not familiar with being spoken).

                    Good luck!
                    Regards,

                    Rick Tinker (a.k.a. "Tink")

                    Comment


                      #11
                      Thanks to you all,
                      I think that i'm going to make up my mind with all the informations you provided to me...I 've already tought about calling an external software to fill my needs but since I want to keep a good stability et reliability with my HS config , i was not sure that it was the best choice.
                      May be playing the wav files put in some kind of "queue" so as to make sentences will represents the best way to go... My fear is about the delay that my player will insert between each file (ie each word).I just hope that this delay won't be too long..
                      Thanks again.

                      Comment

                      Working...
                      X