Non-commercial talking avatar

  • 18 Replies
  • 10212 Views
*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1302
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Non-commercial talking avatar
« on: March 31, 2017, 01:50:20 am »
Here is a personal project of mine: A non-commercial talking avatar.  Really easy to use.  Just press the F5 key. Load a 1940s catch phrase, and the avatar speaks it.


The HTML5, Cascading Style Sheets, JavaScript and PHP programming moves the mouth using home made lip syncing.  The text to speech is licensed under the ResponsiveVoice Non-Commercial license.  Free for personal use. 

So, a home made avatar may lack exactness or accuracy of expression of a commercial avatar running on dedicated hosting.  However, experimenting with HTML5 animation on shared hosting is interesting.



References:

chatbot.tk

responsivevoice.org/

gist.github.com/anchetaWern

« Last Edit: March 31, 2017, 06:12:27 am by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Non-commercial talking avatar
« Reply #1 on: March 31, 2017, 05:28:36 pm »
Sounds good. So this voice is the browser's ?

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1302
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Non-commercial talking avatar
« Reply #2 on: March 31, 2017, 06:53:24 pm »
I haven't had a chance to study this TTS too closely yet. They're extending JavaScript so far these days. But yes, the text to speech voice is from an external JavaScript file with a .js extension. 

I noticed this JavaScript include file method in other web based text to speech.  There is a port of eSpeak, called mespeak.js which produces a very clear robotic voice.

JavaScript TTS allows me to focus on figuring out how to fine tune the lip sync of this personal avatar project.  This is helping me gain a better understanding of HTML5 animation, I think.

Quote from: 8pla.net
:)

« Last Edit: March 31, 2017, 07:20:04 pm by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Non-commercial talking avatar
« Reply #3 on: April 01, 2017, 12:30:31 am »
Nice one 8.

Oddly enough a couple of days ago, while deep into some java scripting, I had set a TTS voice to a higher voice number than usual. From 0 - 10, I set it to a 20. The voice would allow the TTS to work over my server through a non-connected browser.

Bear in mind that I have a limited number of TTS voices on my computer. When I triggered the voice response, it was speaking English but with a Japanese voice (utterance, inflection, etc.). I changed to a slightly lower number and suddenly the next voice was Italian although it too was speaking a very audible English. The next lower number was entered and now a Spanish, then Swedish, then German and finally a disappointing English.

After finally changing the number value to a default setting I was able to get the one that I had wanted from MY collection of voices.

While I have no idea where those voices originated from there were quite interesting. My server was NOT connected to the Internet. Does Windows have other voices stored on our computers that we might not know about?

Open to explanations or "reasonable" theories.

In the world of AI, it's the thought that counts!

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Non-commercial talking avatar
« Reply #4 on: April 01, 2017, 01:14:42 am »
I'm still trying to figure out where 8planet's voice is originating from. Like is it on their server or where ? The female voice being used sounds perfect for one of my projects.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1302
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Non-commercial talking avatar
« Reply #5 on: April 01, 2017, 04:19:02 am »
@Freddy: Save as "sample.html" and give it a test run...

This source code for ResponsiveVoice used under Non-Commercial License
for personal project discussion purposes.  Any commercial use is prohibited.


Code
<script src="https://code.responsivevoice.org/responsivevoice.js"></script>
<script type="text/javascript">
   function say(){
   responsiveVoice.speak("It may be possible. But I am not entirely sure yet.");
   }
   setTimeout(say, 1000);
</script>
<h2>It may be possible. But I am not entirely sure yet.</h2>

You may add in the rest of the HTML tags to make it a complete testing webpage.
As is, this code snippet should run, though, I think.  My reference to Github above, lists a few hundred lines of source code for: responsive-voice.js (Note the added dash in the github .js file.) that may hold clues about calling a server side method.  But, it does say, "no dependencies" at responsivevoice.org .  Let's figure it out.

@Freddy:
@korrelan
Thanks for the Likes.

Quote from: 8pla.net
:)
« Last Edit: April 01, 2017, 04:47:59 am by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Non-commercial talking avatar
« Reply #6 on: April 01, 2017, 05:54:05 pm »
Thanks, that did work yes. I was scanning through the source, saw many Apple voices mentioned in there and others.

Had a quick read of their docs and it seems that it's all done client side. The main purpose of the library is to try to get a similar user experience on different devices. So if you choose a female voice you don't end up with a male one. And the same kind of thing for locales. So looking at the source again it's routing things to the right voices plus some other handy stuff. But the voices themselves are those already installed on your PC, Mac or Android etc.

I didn't know there were voices (and such good ones) built into Chrome though, that's new to me. If you want to see, or rather hear, the default Chrome voice then just drop this into an HTML page and load it up.

Code
<script>
var msg = new SpeechSynthesisUtterance('Hello World');
window.speechSynthesis.speak(msg);
</script>

Reference : https://developers.google.com/web/updates/2014/01/Web-apps-that-talk-Introduction-to-the-Speech-Synthesis-API

Thanks for bringing this up 8planet, I think it will be very useful.  8)

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Non-commercial talking avatar
« Reply #7 on: April 01, 2017, 06:13:17 pm »
Nice one 8.

Oddly enough a couple of days ago, while deep into some java scripting, I had set a TTS voice to a higher voice number than usual. From 0 - 10, I set it to a 20. The voice would allow the TTS to work over my server through a non-connected browser.

Bear in mind that I have a limited number of TTS voices on my computer. When I triggered the voice response, it was speaking English but with a Japanese voice (utterance, inflection, etc.). I changed to a slightly lower number and suddenly the next voice was Italian although it too was speaking a very audible English. The next lower number was entered and now a Spanish, then Swedish, then German and finally a disappointing English.

After finally changing the number value to a default setting I was able to get the one that I had wanted from MY collection of voices.

While I have no idea where those voices originated from there were quite interesting. My server was NOT connected to the Internet. Does Windows have other voices stored on our computers that we might not know about?

Open to explanations or "reasonable" theories.


As per my link above, if I read you right it seems those voices came from your browser Art.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1302
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Non-commercial talking avatar
« Reply #8 on: April 02, 2017, 05:13:23 pm »
I didn't know there were voices (and such good ones) built into Chrome though, that's new to me. If you want to see, or rather hear, the default Chrome voice then just drop this into an HTML page and load it up.

Code
<script>
var msg = new SpeechSynthesisUtterance('Hello World');
window.speechSynthesis.speak(msg);
</script>

Reference : https://developers.google.com/web/updates/2014/01/Web-apps-that-talk-Introduction-to-the-Speech-Synthesis-API

Thanks for bringing this up 8planet, I think it will be very useful.  8)

You're welcome.

This JavaScript code snippet says, "Hello World" in Ubuntu!
When opened directly in Firefox with: file:///tmp/testspeech.html
This leaves me wondering whether this may run on Android too ?

My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1302
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Non-commercial talking avatar
« Reply #9 on: April 02, 2017, 05:49:41 pm »
UPDATE:

Reference: http://chatbot.tk/avatar

This personal project showed limited success on Android devices, with the better results in Landscape Mode than Portrait Mode.   The animation and text to speech audio are both working correctly, but are a little out of sync on Android.  However, it was not designed for Android, so limited success is good at this point. It is mostly there, just not all of the way there. The next step will be to detect the Android user agent and try to tweak it.

My Very Enormous Monster Just Stopped Using Nine

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Non-commercial talking avatar
« Reply #10 on: April 02, 2017, 05:52:49 pm »
Cool, yes I tested it on Android and got the same nice voice from my tablet.  8)

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1302
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Non-commercial talking avatar
« Reply #11 on: April 03, 2017, 03:54:42 pm »
Art asked, "Does Windows have other voices stored on our computers that we might not know about?" for the sake of discussing "reasonable" theories.

In theory, yes it would be "reasonable", if you discovered unknown voices.  The question is, "Where in Windows?" are these unknown voices stored. "much of the functionality of the operating system is provided by dynamic link libraries", says Microsoft support.

So, Microsoft support is a good place to start.  There is  a Text To Speech Dynamic Link Library (TTS.DLL) originally for the Super Nova Reader Magnifier that was developed by Dolphin Computer Access Ltd. for Microsoft Windows. The latest known version may be  1.0.0.0. unchanged for Windows 10, 8, 7, Vista, XP, ME, 2000.

Since TTS.DLL is an external file, there is always the possibility that it was corrupted into storing unknown voices (you might not know about) courtesy of a computer virus.

Reference:

https://support.microsoft.com/en-us/help/815065/what-is-a-dll
My Very Enormous Monster Just Stopped Using Nine

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Non-commercial talking avatar
« Reply #12 on: April 05, 2017, 08:36:15 pm »
The source code from the responsive voice script gives a lot of hints :

Code
// Our own collection of voices
        var responsivevoices = [
            {name: 'UK English Female', voiceIDs: [3, 5, 1, 6, 7, 8]},
            {name: 'UK English Male', voiceIDs: [0, 4, 2, 6, 7, 8]},
            {name: 'US English Female', voiceIDs: [39, 40, 41, 42, 43, 44]},
            {name: 'Spanish Female', voiceIDs: [19, 16, 17, 18, 20, 15]},
            {name: 'French Female', voiceIDs: [21, 22, 23, 26]},
            {name: 'Deutsch Female', voiceIDs: [27, 28, 29, 30, 31, 32]},
            {name: 'Italian Female', voiceIDs: [33, 34, 35, 36, 37, 38]},
            {name: 'Greek Female', voiceIDs: [62, 63, 64]},
            {name: 'Hungarian Female', voiceIDs: [9, 10, 11]},
            {name: 'Russian Female', voiceIDs: [47,48,49]},
            {name: 'Dutch Female', voiceIDs: [45]},
            {name: 'Swedish Female', voiceIDs: [65]},
            {name: 'Japanese Female', voiceIDs: [50,51,52,53]},
            {name: 'Korean Female', voiceIDs: [54,55,56,57]},
            {name: 'Chinese Female', voiceIDs: [58,59,60,61]},
            {name: 'Hindi Female', voiceIDs: [66,67]},
            {name: 'Serbian Male', voiceIDs: [12]},
            {name: 'Croatian Male', voiceIDs: [13]},
            {name: 'Bosnian Male', voiceIDs: [14]},
            {name: 'Romanian Male', voiceIDs: [46]},
            {name: 'Fallback UK Female', voiceIDs: [8]}

        ];

        //All voices available on every system and device
        var voicecollection = [
            {name: 'Google UK English Male'}, //0 male uk android/chrome
            {name: 'Agnes'}, //1 female us safari mac
            {name: 'Daniel Compact'}, //2 male us safari mac

            {name: 'Google UK English Female'}, //3 female uk android/chrome
            {name: 'en-GB', rate: 0.25, pitch: 1}, //4 male uk IOS
            {name: 'en-AU', rate: 0.25, pitch: 1}, //5 female english IOS
           
            {name: 'inglés Reino Unido'}, //6 spanish english android
            {name: 'English United Kingdom'}, //7 english english android
            {name: 'Fallback en-GB Female', lang: 'en-GB', fallbackvoice: true}, //8 fallback english female
           
            {name: 'Eszter Compact'}, //9 Hungarian mac
            {name: 'hu-HU', rate: 0.4}, //10 Hungarian iOS
            {name: 'Fallback Hungarian', lang: 'hu', fallbackvoice: true}, //11 Hungarian fallback

            {name: 'Fallback Serbian', lang: 'sr', fallbackvoice: true}, //12 Serbian fallback

            {name: 'Fallback Croatian', lang: 'hr', fallbackvoice: true}, //13 Croatian fallback

            {name: 'Fallback Bosnian', lang: 'bs', fallbackvoice: true}, //14 Bosnian fallback

            {name: 'Fallback Spanish', lang: 'es', fallbackvoice: true}, //15 Spanish fallback
            {name: 'Spanish Spain'}, //16 female es android/chrome
            {name: 'español España'}, //17 female es android/chrome
            {name: 'Diego Compact', rate: 0.3}, //18 male es mac
            {name: 'Google Español'}, //19 male es chrome
            {name: 'es-ES', rate: 0.20}, //20 male es iOS

            {name: 'Google Français'}, //21 FR chrome
            {name: 'French France'}, //22 android/chrome
            {name: 'francés Francia'}, //23 android/chrome
            {name: 'Virginie Compact', rate: 0.5}, //24 mac
            {name: 'fr-FR', rate: 0.25}, //25 iOS
            {name: 'Fallback French', lang: 'fr', fallbackvoice: true}, //26 fallback

            {name: 'Google Deutsch'}, //27 DE chrome
            {name: 'German Germany'}, //28 android/chrome
            {name: 'alemán Alemania'}, //29 android/chrome
            {name: 'Yannick Compact', rate: 0.5}, //30 mac
            {name: 'de-DE', rate: 0.25}, //31 iOS
            {name: 'Fallback Deutsch', lang: 'de', fallbackvoice: true}, //32 fallback

            {name: 'Google Italiano'}, //33 IT chrome
            {name: 'Italian Italy'}, //34 android/chrome
            {name: 'italiano Italia'}, //35 android/chrome
            {name: 'Paolo Compact', rate: 0.5}, //36 mac
            {name: 'it-IT', rate: 0.25}, //37 iOS
            {name: 'Fallback Italian', lang: 'it', fallbackvoice: true}, //38 fallback

            {name: 'Google US English', timerSpeed:1}, //39 EN chrome
            {name: 'English United States'}, //40 android/chrome
            {name: 'inglés Estados Unidos'}, //41 android/chrome
            {name: 'Vicki'}, //42 mac
            {name: 'en-US', rate: 0.2, pitch: 1, timerSpeed:1.3}, //43 iOS
            {name: 'Fallback English', lang: 'en-US', fallbackvoice: true, timerSpeed:0}, //44 fallback
            {name: 'Fallback Dutch', lang: 'nl', fallbackvoice: true, timerSpeed:0}, //45 fallback

            //{name: 'Simona Compact'}, //NaN Romanian mac female
            //{name: 'ro-RO', rate: 0.25}, //NaN iOS female
            {name: 'Fallback Romanian', lang: 'ro', fallbackvoice: true}, //46 Romanian Male fallback

            {name: 'Milena Compact'}, //47 Romanian mac
            {name: 'ru-RU', rate: 0.25}, //48 iOS
            {name: 'Fallback Russian', lang: 'ru', fallbackvoice: true}, //49 Romanian fallback

            {name: 'Google 日本人', timerSpeed:1}, //50 JP Chrome
            {name: 'Kyoko Compact'}, //51 Japanese mac
            {name: 'ja-JP', rate: 0.25}, //52 iOS
            {name: 'Fallback Japanese', lang: 'ja', fallbackvoice: true}, //53 Japanese fallback

            {name: 'Google 한국의', timerSpeed:1}, //54 KO Chrome
            {name: 'Narae Compact'}, //55 Korean mac
            {name: 'ko-KR', rate: 0.25}, //56 iOS
            {name: 'Fallback Korean', lang: 'ko', fallbackvoice: true}, //57 Korean fallback

            {name: 'Google 中国的', timerSpeed:1}, //58 CN Chrome
            {name: 'Ting-Ting Compact'}, //59 Chinese mac
            {name: 'zh-CN', rate: 0.25}, //60 iOS
            {name: 'Fallback Chinese', lang: 'zh-CN', fallbackvoice: true}, //61 Chinese fallback

            {name: 'Alexandros Compact'}, //62 Greek Male Mac
            {name: 'el-GR', rate: 0.25}, //63 iOS
            {name: 'Fallback Greek', lang: 'el', fallbackvoice: true}, //64 Greek Female fallback

            {name: 'Fallback Swedish', lang: 'sv', fallbackvoice: true}, //65 Swedish Female fallback

            {name: 'hi-IN', rate: 0.25}, //66 iOS
            {name: 'Fallback Hindi', lang: 'hi', fallbackvoice: true} //67 Hindi Female fallback

        ];

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6855
  • Mostly Harmless
Re: Non-commercial talking avatar
« Reply #13 on: April 05, 2017, 08:37:41 pm »
I'm guessing the voice used on my desktop Chrome and on my Android Chrome is this one in that list :

Code
{name: 'Google UK English Female'}, //3 female uk android/chrome

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1302
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Non-commercial talking avatar
« Reply #14 on: April 07, 2017, 08:54:09 pm »
UPDATE:

I developed a few small adjustments to this preliminary model.

In some respects, it may be less of a rough version than it was originally.

The URL is still the same at: http://chatbot.tk/avatar


My Very Enormous Monster Just Stopped Using Nine

 


OpenAI Speech-to-Speech Reasoning Demo
by ivan.moony (AI News )
Today at 01:31:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

286 Guests, 0 Users

Most Online Today: 343. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles