Using Google Cloud Speech on mobile never returns an isFinal - node.js

I am currently implementing a ChatBot using Google Cloud Speech.
I am using socket.io to record a microphone stream and then sending that through node to Google Cloud Speech.
Everything is working fine on my laptop and my android mobile phone (Nexus 5x, Chrome 68)
I record the audio, and having set single_utterance to true, get a result with "isFinal" as soon as I pause speaking.
But if I set the language code to 'da-DK', I never get a "isFinal" result (unless I end the stream myself) on mobile. Works fine on my laptop, but not mobile.
Have anyone experienced anything similar?
As a bonus info:
If I set interimResults to true, I do get multiple results, but they are just never isFinal.
So just to be clear: everything is working perfectly apart from the one case: da-DK on mobile.

As this behavior is occurring only when using the da-DK supported language on a mobile device, it might be related to an internal service issue; therefore, I think that you should take a look the Issue Tracker tool that you can use to raise a Speech-to-Text API in order to verify this scenario with the Google Technical Support Team. In this way, you will be able to share your code, audio files and internal project information if required by the troubleshooting process.
Additionally, I suggest you to take a look on this link that contains some useful documentation and example to use Google Cloud Speech API on an Android environment that you may use as a reference for your project.

Related

Linking DialogFlow to a Desktop Application

i just started on a project in DialogFlow and i was wondering is it possible to link my dialogflow to a specific desktop application? And if possible, what is the solution?
For example:
By saying "launch app", it will open up the desktop application "app"
While this is certainly something that Dialogflow's APIs can help with - this isn't a feature provided by Dialogflow itself. Dialogflow's NLP runs in the cloud - there is nothing local that it can "do".
However, you can create a launcher app that does this sort of thing by opening the microphone and sending either the stream or a speech-to-text version to Dialogflow through the Detect Intent API. Dialogflow can determine an Intent that would handle this and pass that information back to your launcher, and your launcher can then locate the app and start it.
I'm not sure how practical this would be, however. Microsoft already has this feature built-in with Cortana, and Google is building the Assistant into ChromeOS which will do this as well. While I'm not aware of Apple doing this, I may just have missed an announcement that Siri does this as well. And if there isn't someone who is doing this for Linux using some local speech-to-text libraries, it sounds like the perfect opportunity to do so.
You may try and use different Dialogflow clients available on their GitHub page. Java Client 2 may be helpful to start your work. However, you will be required to write your own UI code and have to consume Dialogflow API.

Set up Google Analytics to track a command line Node app

I'd like to use Google Analytics to track usage of a command line Node app. Tracking will be strictly opt-in. I'd like to track basic usage, plus which operating system and version of Node was used.
I've found the Measurement Protocol, but I'm wondering whats the best way to set up Google Analytics.
You can choose from Web or App - App seems the best fit, but then I'm sent to Firebase to set up an iOS, Android or Web app. None of these are correct. So is 'Web' the best way to track my app usage? Or is Google Analytics not the right approach?
Seems like the best approach is Google Measurement Protocol. There's a Node library for it.
Really Google Analytics is completely designed around web apps and more recently mobile apps, it has concepts like "page views" which don't make sense for CLIs, and Firebase Analytics is only for Android and iOS.
You might be able to shoehorn he CLI use case for some purposes. Alternatively, you could consider using a cloud database like Firebase real-time DB to capture your own events.
Google analytics really isnt designed for something like this. You have only two options web app where everything is page based. http://example.com/hello.php vs using a mobile app where everything is screen based. Home, about, help.
I have done this before with several console applications, a custom SSIS task (dll) and an arduino project. I chose mobile application mainly because i thought it was closer. I know of someone who did the same with an actions on google project.
In the end what you use will be up to you. Just consider what it is you want to track exactly and lay it out before you start.
If you choose mobile make sure you send Screen views and not page views. The Google analytics website is split you cant mix and match the hit type.
Workaround for createing moble account without firebase.
create a new web property on Google analytics type Web
create a new view under that web property type mobile.
We made Console Cat for this exact purpose! It's built from the ground up to track telemetry / analytics for CLIs including things like flags, command duration, version, etc.

actions on google demo code is not working on my android phone

I followed https://developers.google.com/actions/dialogflow/first-app tutorial and built my first google action. The action is working fine on my laptop browser in the test (Followed "Preview the App" section of the tutorial) environment. However, when I am trying to use this action on my phone by saying "OK Google talk to my first app". It's not working. Is it supposed to work on my phone as well? I have logged in with the same Gmail account on my phone also.
PS - I have posted the same question on "actions on google" google plus community google as well but I am not sure if that community is to post such questions or not. Therefore, I am posting it here also.
Thanks in advance!
Once you have enabled testing through the simulator, it should be available on all devices (mobile, speakers like Google Home, etc) with the same account your simulator is running in. Double check to make sure they're the same account.
In your case, however, you may be using the wrong invocation phrase. If you actually said what you did above, you need to say the exact same thing that you typed to invoke it.
If you haven't set a name in the configuration, then that phrase will be
Talk to my test app
Update
As you note in the comments - you also need to make sure you're running the Google Assistant, and not one of the other voice search components. The Google Assistant requires:
Android 6.0 or higher
Google app 6.13 or higher
Google Play services
1.5 GB of memory
720p screen resolution
Phone set to a supported language
As you probably already know you have to enable Web & App Activity, Device Information, Voice & Audio Activity in the Activity controls page.
Then you also have to be sure that the language of your agent is the same used by your google assistant.
I solved thanks this last step.
Hope this helps

Can I use Yandex Maps in a Nokiax app?

I need to use Yandex Maps in an app instead of Here Maps. Could this be possible? Any hints or tricks to help me?
Thanks
Basically the rules of using APIs is very simple. If the API is not requiring any parts that are not available in the platform, then it works.
Thus if the API is using parts that are supported in AOSP 4.1.2 API level 16, and using any Google services, then it is likely to work just fine.
And you can always check the compatibility with free online tools very easily. First go to Online Analyser drag and drop the APK there, and let the tool check the compatibility issues.
Then you can also use a real device for testing, just visit Remote Device Access, and reserve a device for testing your app.
Both steps should onlky take you couple of minutes to complete.
For Yandex maps, you would need to visit their developer site to see how the maps API can be used, and what restrictions they would pose on utilizing the API.

Posting to Instagram via Script/Online/Program. Anything is good but mobile

I just wanted to know if there is a way to upload images to Instagram WITHOUT using iOS / Android?
I'm really desperate for a solution, if I can't find anything I will have to run a virtual android device or something like that (I have a virtual machine running Windows XP 24/7 anyway)!
Instagram's official RESTful API does not allow for uploading photos, since they want to encourage "life on the go."
However, some work has been put together to document their iPhone API, and some unofficial client libraries have even been made. Check out https://github.com/mislav/instagram/wiki
It seems that's your only alternative at the moment. None of the unofficial libraries look very complete, so you'd have to do the work of sending requests manually, using the reverse-engineered API specs provided in the wiki.

Resources