kun432's blog

Alexaなどスマートスピーカーの話題中心に、Voiceflowの日本語情報を発信してます。たまにAWSやkubernetesなど。

〜スマートスピーカーやVoiceflowの記事は右メニューのカテゴリからどうぞ。〜

Feature Request: Adding support for Japanese to Voiceflow's Prototype

Today, Voiceflow has releaased new Navigateion bar updates, which includes some updates for Prototype.


Intro to Voiceflow - Update | Exploring our new Navigation Bar

Now, you can start Prototype testing from any blocks by just clicking Play icon on top of each block.

f:id:kun432:20201205012344p:plain

Also during test, you can go forward/back anytim by clicking allow icons.

f:id:kun432:20201205012729p:plain

Share button is also nice feature. Without Echo devices or publishing your skill, you can share your prototype link and people can try your skill via browser.

Prototype sounds very nice, attractive and works well for alphabetic languages such as English/Spanish/French/German/etc.

BUT FOR JAPANESE, PROTOTYPE DOES NOT WORKS.

Word Divider

For example, in English, each word is separeted by space.

give me some coffee

This is pretty good for typical conversational model such as sample utterances and slots.

give me some {drink_name}

However, in Japanese, we don't use any space for dividing words.

コーヒーを下さい

Let's break down these into grammatical elements.

コーヒー        を        ください
(o:coffee)            (v:give me)

「を」 is one of postpositional particles connecting subject, verb, objective, Complement, etc. Also, Japanese has 3 alphabets such as hiragana/katakana/kanji, which we use differently depending on its meaning of word. These grapmmertical techniques help us to understand each word in a sentence even if we don't use any spaces for dividing a sentences into words.

Why Prototype does not work for Japanese

In Choice Block, putting some sample utterances and slots for an intent, we must put a single space before/after slot.

f:id:kun432:20201205131429p:plain

Let's test with using Prototype. This is my sample and I am using a mic and also using else path for not matching any intents or sample utterances.

f:id:kun432:20201205133851p:plain

f:id:kun432:20201205132812p:plain

My browser understand what I said correctly.

f:id:kun432:20201205133509p:plain

but as a result, not matched with intents or sample utterances.

f:id:kun432:20201205133653p:plain

Test again. This time, I use typing and putting a single space after a slot.

f:id:kun432:20201205134645p:plain

It works and goes to the next block.

f:id:kun432:20201205134931p:plain

Now you see, we need to use a space as word divider although Japanese does not need it and browser's Web Speech API Speech Recognition, which I guess Voiceflow uses for Prototype, also does not need it for Japanese.

That's why Prototype does not attaracts Japanese.

How about Alexa's test simulator on Developer Console

As a reference, I will show you some results on ADC.

First, using a mic. This seems that Alexa automatically insert a space between words depending on grammatical elements.

f:id:kun432:20201205135924p:plain

Next, using my keyboard as input. With no spaces for dividing words, Alexa understands correctly, too.

f:id:kun432:20201205140548p:plain

Conclusion

Prototype is very dynamic and neat and new features visually attract us. However, Intents, slots, sample utterances are the most important part for conversational model. If it does not work in Prototype, we cannot use it all.

I don't think this is a bug, so I made a feature request. Please consider this.