I made a talking emoji using regular emojis and JavaScript
hackernoon.com
hackernoon.com
Thanks for this extremely intriguing idea to use emoji to depict a talking person visually.
You know, some animated films get it right. Sometimes I clearly see utterances like «Thank you!», «Okay», but more often not. Especially older animations don't care and just let the character move the mouth in very simplistic ways: «Babbabbabaa Baababba ba baaa.»
Similarly for that emoji. It is moving the mouth in quite arbitrary ways. It looks like: «Sobbabbabee be <grin> seebee <grin> <frown> babbaa».
To solve this problem we need about twelve emoji for utterances: «ah», «ay», «ee», «oh», «oo», «b», «d», «f», «l», «n», «r» and «s». The «r» emoji must be animated (so we see the trilling tongue). The other sounds are either invisible like «k» or cover several different sounds like «b» also covering «m» and «p».
«Okay» would be rendered by: «oh», «oo», «oo» (standing for «k» wich is invisible) «ay» and «ee».
Edit: Add «th». This is an extremely simple sound to lipread. I remember my delight when I learnt English in my youth and in an movie suddenly realised that an actor said «Thank you».
I agree that the mouth shapes are garbage in this demo. A shame because that is the most interesting & important part of animating speech.
I'm happy that this article has triggered some people curiosity and can maybe evolve in something more advanced
p.s. Seems every day on here I'm reminding people from the US that their country is not the world, their version of English is spoken and spelt in just one country, etc etc etc. Maybe I should give up doing that.
The most classic maybe was a linguist (yes, amazing) who on her blog was gloating that her variety of US English was particularly rich, in having almost every vowel sound in English. I looked at her list.. it didn't include the 'o' sound in 'pot'..
Maybe that's why most animation studios don't bother.
Dubs. 90% of your viewers will see it in a foreign language, dubbed, where all your lipsyncing effort is useless anyway.
In fact, lipsyncing ut to english makes it look worse in the dub than having random nonsense movements.
As child (due to deafness until I was almost 5) I relied a lot on lip reading, and it was very noticeable if something was dubbed.
I remember distinctly this wonderful line from the 5th element:
- Are you classified as human?
- Negative. I'm a meat Popsicle!
Which they translated to french into:
- ...?
- Negatif. Je suis une mite en pull over !
Which has not relation at all to the initial line, and literally translateds mean "I'm a moth wearing a sweater".
But it's equally nonsensical, definitely as funny, and the beautiful thing is, the lipsync is near perfect.
However it's a lot of work, requires very talented people to achieve, and is mostly useless in the eyes of the right owners: money will come anyway if the movie is average, so why bother making it better ?
*(just another rabbit hole actually, Unicode got plenty of them already)
"text engine developers hate him"
It definitely is! The Latin alphabet gets a special place at the start of the range, in order to be compatible with ASCII, an English-language character set.
I didn't criticise it, did I? I just pointed it out. So I don't need to see any better alternative.
But I don't follow your argument - it's not English centric because they were only bending over backwards to make sure that the English-speaking world accepted it by designing it around them?
The only sounds I would be very confident at recovering sounds from images for ‘th’, ‘w’, ‘o’, & indistinguishable voiced/unvoiced pairs like ‘b’/‘p’ or ‘v’/‘f’. Basically, the sounds a ventriloquist has to cheat.
http://onlinebooks.library.upenn.edu/webbin/gutbook/lookup?n...
https://github.com/cmusphinx/cmudict
The problem is that they'd be pretty hefty payloads to load on the client, so you'd want to do the text -> phone mapping elsewhere. Then use your character mapping as backup for words that aren't in the dictionaries.
… well, that’s one encoding of the UTF-8 encoding of the Unicode code point.
> This is because setInterval(_=>{ },99) executes the function every 99ms
This is categorically wrong. You can’t trust setInterval to heed your request precisely at all: it’s a request that browsers take as a minimum only. Most browsers will call your function after the number of milliseconds you requested plus up to 16ms more, but some might wait even more than that (I think Safari in power saving mode doubles its tick time, to operate at 30fps; and background tabs typically won’t fire more than once a second these days).
Try running this snippet in your dev tools; it logs the number of milliseconds between calls:
t=Date.now();setInterval(()=>console.log(-t+(t=Date.now())), 99)
On Firefox I’m getting mostly 108–111, with the odd one a little higher, and a couple of 99s after running it for a few minutes.(Some trivia on similar techniques for this measurement: `+new Date` is rather slow, `Date.now()` is about 7× faster in at least Firefox and Chrome, and `performance.now()` gets you microsecond precision (it returns a floating-point number in milliseconds, tied to an unspecified epoch instead of real-world time), and is a little slower than Date.now().)
99 % 6 === 3 ((99 % 6) + 99) % 6 === 0 ((((99 % 6) + 99) % 6) + 99) % 6 === 3
Also I neglected to mention other frame rates; 60fps is the most common, but you do get some 144fps devices, where you’ll be looking at about 7ms delays rather than 16ms.
There should be emoji after the colon, I can type them fine in Chrome. Truth be told, they would make up great return values, making yourself indispensable to your employer.
Maybe that has something to do with the character range limits. Not all non-ASCII is forbidden, though: Français should work AFAIK, and I've seen Chinese and Japanese.
Pedantic note: JS iterates through UTF-16 2-byte code units. It's that way for compatibility reasons (used to be UCS-2), but it's the worst of both worlds: not as good as UTF-8 for ASCII, can't do operations in O(1) time like UTF-32.
See https://mathiasbynens.be/notes/javascript-encoding for a discussion of the topic.
I’m perpetually sad that a couple of big players decided to go all in on UCS-2/UTF-16 when it should already have been apparent that UTF-8 was roughly uniformly superior and that UCS-2/UTF-16 would have major issues. (I speak as one who was a child at the time, but has read a fair bit about the state of things back then. So don’t trust my yearning optimism.)
The worst part about UTF-16 is how it poisoned Unicode with surrogate pairs. UTF-32 and UTF-8 are both good because they didn’t need any special consideration from Unicode to make them work. But UTF-16, extending UCS-2 as it does… ugh.