timstableford / p-brainandroid Goto Github PK
View Code? Open in Web Editor NEWP-Brain Android Client
License: MIT License
P-Brain Android Client
License: MIT License
Voice recognition needs to added. Initial experiments show PocketSphinx has trouble picking up key words and has very low accuracy. It may be necessary to use Google voice libraries and have a button for listening.
Add text to speech on responses, handling the silent flag too. Probably using Google API's.
If the speech to text dialog is dismissed by clicking around it, then hotword detection no longer functions.
When in the training screen, upon pressing the train button the network request (whilst uploading the samples) fails.
The error is {"name":["This field may not be blank."]}
and it seems to be stemming from obj.put("name", name);
with name being null
, in TrainActivity.java
I've tried hardcoding name
to be an arbitrary static value to no effect, is it being passed into the query when it needs to be in the headers or vice versa?
not able to login, into the app
in connection setting gave server address as http://192.168.2.4:4567
username : admin
password : admin
Please tell the steps on how to run the app
The connectivity should be moved to a background service to allow notifications to be pushed when the app is not in the foreground.
If the name hasn't been received from the server it's possible to access the training activity and the name be null. There needs to be a null check to disable access.
App crashes on Arm8 devices when enabling hotword detection.
If the client fails to connect to the server, or there's an internal server error then the login prompt is shown. The solution for this should be two-fold. There should be a connectivity check to the server and the response code from /api/validate should be checked more accurately, only showing login if the server says the user is not authorized.
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.ashish.friday, PID: 2749
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.android.ashish.brain-2/base.apk"],nativeLibraryDirectories=[/data/app/com.android.ashish.brain-2/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libsnowboy-detect-android.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:984)
at java.lang.System.loadLibrary(System.java:1530)
at ai.kitt.snowboy.snowboyJNI.(snowboyJNI.java:13)
at ai.kitt.snowboy.snowboyJNI.new_SnowboyDetect(Native Method)
at ai.kitt.snowboy.SnowboyDetect.(SnowboyDetect.java:39)
at com.android.ashish.friday.HotwordDetector.(HotwordDetector.java:117)
at com.android.ashish.friday.MainActivity.finishSetup(MainActivity.java:194)
at com.android.ashish.friday.MainActivity.access$100(MainActivity.java:76)
at com.android.ashish.friday.MainActivity$2.onSuccess(MainActivity.java:154)
at com.android.ashish.friday.ConnectionManager$3$2.run(ConnectionManager.java:204)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
The training activity is not intuitive and could be a lot better looking.
Just noticed Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
occurring at runtime with v2, error is occurring in
private void setupSocket(String server) {
if (!connectedServer.equals(server) || mSocket == null) {
teardownSocket();
try {
mSocket = IO.socket(server);
setupSocketListeners();
connectedServer = server;
mSocket.connect();
} catch (URISyntaxException e) {
Log.e(TAG, "Error connecting socket.io.", e);
statusMessage(getString(R.string.server_not_connected));
}
}
}
of the MainActivity.java
on this if (!connectedServer.equals(server) || mSocket == null) {
line (Line 265)
That said my device is API 25 (i.e Nougat) so maybe it is something related to that.
Hello, This is the text of my json processing module.The problem is: when I specify the port, it stops working and the assistant says that he did not understand me.
How to fix it???
my knowledge of the code is not strong, you maybe need to connect another one library.
but I do not understand how to connect them, I work through docker.
help me please
constrequest = require('co-request')
const util = require('util')
const intent = () => ({
keywords: ['number qqq', 'number action qqq'],
module: 'abonent_oblgas'
})
function * abonent_oblgas_resp(query) {
const request = require('request');
let country_res = request("http://192.168.10.55:8444/getabonentbynumberofcontract?number=10&id_podr=1")
country_res = JSON.parse(country_res.body)
const loc_string = country_res.city + ',' + country_res.country
return loc_string.toLowerCase()
return{text: 'Нет связи с сервером облгаз.'+fuull}
}
const examples = () => (
['number 587', 'number action 144']
)
module.exports = {
get: abonent_oblgas_resp,
intent,
examples
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.