alan-ai / alan-sdk-reactnative Goto Github PK
View Code? Open in Web Editor NEWConversational AI SDK for React Native to enable text and voice conversations with actions (iOS and Android)
Home Page: https://alan.app/
Conversational AI SDK for React Native to enable text and voice conversations with actions (iOS and Android)
Home Page: https://alan.app/
Versions:
Device OS version: Android 13
React native version: 0.70.6
@alan-ai/alan-sdk-react-native: 1.18.0
Reproduce steps:
new NativeEventEmitter()
was called with a non-null argument without the required removeListeners
method.after i run npm i @alan-ai/alan-sdk-react-native --save the react native app will now work anymore , it will constantly give error when i try to start the project. I have tried creating several new projects but same results
Versions:
Device OS version: Android 9
React native version: 0.66.3
@alan-ai/alan-sdk-react-native: 1.8.0
Integrate code:
Subscribe
import {NativeEventEmitter, NativeModules} from 'react-native';
const {AlanManager, AlanEventEmitter} = NativeModules;
const alanEventEmitter = new NativeEventEmitter(AlanEventEmitter);
const alanSubscriber = alanEventEmitter.addListener('command', data => {
console.log(got command event ${JSON.stringify(data)}
);
});
Alan Button
{alanKey && }
Description:
onVisualState((p, s) => {
console.log(s)
});
AlanManager.setVisualState({
bool: true,
string: 'haha',
number: 123,
array: [ 'q', 'w', 'e', 'r'],
object: {
name: 'allen',
isTest: true,
},
});
{ bool: true, number: 123, object: { isWorking: true, name: 'allen' }, string: 'haha' }
from onVisualState
, missing array: [ 'q', 'w', 'e', 'r'],
onVisualState
returns full data.In my case, I want to display the Alan button after the user logs in. It works well. But when the user logs out, the Alan button still exists, even though its parent component has been removed
Since @alan-ai/[email protected], I can not wake alan via "Hey Alan", I'm using 1.20.0 now, it works well
Hi
i was trying to to Integration after i set the project id error appear ,
note: i use react native Bare Workflow
this my project repository: https://github.com/Greycode011/m.b.a.u.v.c
can you place help me it's important for Alan voice Assistant to work for my graduation project .
thanks
I installed @alan-ai/alan-sdk-react-native for using Alan ai in my expo project. It was fine with the installation but when I imported AlanView from @alan-ai/alan-sdk-react-native and rendered in the home page it gives this error. I am trying but unable to resolve it since 2 days now.
I followed
https://www.youtube.com/watch?v=ttGfydUvg6A&t=264s
exactly as it is in the video but still get the error
I am testing it on android version 12 on expo go app as and using the same template as in the video
The only thing different from video I did is that I used --legacy-peer-deps for installing @alan-ai/alan-sdk-react-native as it was having dependencies conflicts
Here is package.json of my project:
The error :
How you can reproduce this issue
npm i -g expo-cli
npx create-expo-app my-app
npm i @alan-ai/alan-sdk-react-native
import { AlanView } from '@alan-ai/alan-sdk-react-native';
<AlanView projectid={ALANSDK_PROJECT_KEY}/>
You will get this type of error in the terminal
The alan sdk package runs very well on Android Studio Emulator but after a lot of configurations on the emulator.
Problem, when developing, the Alan button will cause a problem with the hot reload of react native. Steps to reproduce the problem:
Will there be any support for React Native TVOS?
Versions:
Device OS version: Android 9
React native version: 0.65.1
@alan-ai/alan-sdk-react-native: 1.6.0
Integrate code:
import {NativeEventEmitter, NativeModules} from 'react-native';
const {AlanManager, AlanEventEmitter} = NativeModules;
const alanEventEmitter = new NativeEventEmitter(AlanEventEmitter);
const alanSubscriber = alanEventEmitter.addListener('command', data => {
console.log(`got command event ${JSON.stringify(data)}`);
});
{alanKey && <AlanView projectid={alanKey} />}
Reproduce steps:
AlanView
, the error won't occur.Hi, kind staff, could I ask if it was possible to change Alan's image and be able to put a Gif? eventually I could modify the interface of him and customize it to my liking?
The wakeword is not working with Alan after getting added to a website.
Even though the Alan button is added in the code, it is not seen on the page.
I do not need the text panel with words. Can it be removed (and how) to only leave the button?
Versions:
Device OS version: Android 9
React native version: 0.65.1
@alan-ai/alan-sdk-react-native: 1.6.0
Integrate code:
Subscribe
import {NativeEventEmitter, NativeModules} from 'react-native';
const {AlanManager, AlanEventEmitter} = NativeModules;
const alanEventEmitter = new NativeEventEmitter(AlanEventEmitter);
const alanSubscriber = alanEventEmitter.addListener('command', data => {
console.log(`got command event ${JSON.stringify(data)}`);
});
Alan Button
{alanKey && <AlanView projectid={alanKey} />}
Description:
Hello, I'm using Windows and "expo": "~39.0.2" and tried to import AlanView
like this:
import { AlanView } from "@alan-ai/alan-sdk-react-native/AlanSDK"
However, I got this error:
I also tried copying files: AllanButton
, AlanSDK
, AlanText
from node modules to the root app directory manually, but then got these errors:
Is there something wrong about how I'm importing the files or is it expo, or maybe some other issue?
Versions:
Device OS version: Android 9
React native version: 0.66.3
@alan-ai/alan-sdk-react-native: 1.10.0
Reproduce steps:
Is there a way to share a voice script within the Studio with someone else? Does there need to be some kind of ID to be added to the URL or similar?
โฏ sudo npm i @alan-ai/alan-sdk-react-native --save
@alan-ai/[email protected] postinstall /Users/codrain/Desktop/React Native/alanNews/node_modules/@alan-ai/alan-sdk-react-native
cp AlanSDK.js $INIT_CWD && cp AlanButton.js $INIT_CWD && cp AlanText.js $INIT_CWD
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
npm ERR! code ELIFECYCLE
npm ERR! errno 64
npm ERR! @alan-ai/[email protected] postinstall: cp AlanSDK.js $INIT_CWD && cp AlanButton.js $INIT_CWD && cp AlanText.js $INIT_CWD
npm ERR! Exit status 64
npm ERR!
npm ERR! Failed at the @alan-ai/[email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/codrain/.npm/_logs/2021-01-16T16_24_42_297Z-debug.log
alan-ai: latest version
react-native: 0.66.3
iOS: 14.6 (Iphone XR)
In my app I have the expo-av module (for implementing audio playback). And Alan works perfectly until I use this or any other audio library. Alan just stops using phone's microphone and listening to commands after I use any methods of these libraries.
Is it possible that they use the same native audio module and interrupt each other?
And is there a way to kind of reinitialize Alan?
Cannot see the Alan button in Internet Explorer.
After adding the AlanButton to app:
import alanBtn from "@alan-ai/alan-sdk-web";
alanBtn({
key: "myKey",
rootEl: document.getElementById("alan-btn")
});
function Layout({ children }) {return (
<>
<main>
<Banner />
{children}
<div id="alan-btn"></div>
</main>
<Footer />
</>
);
}
Error after building it:
ReferenceError: navigator is not defined
at undefined.window.alanAudio (/Users/james/Work/ssrtest/node_modules/@alan-ai/alan-sdk-web/index.js:13:5)
at /Users/james/Work/ssrtest/node_modules/@alan-ai/alan-sdk-web/index.js:271:3
at /Users/james/Work/ssrtest/node_modules/@alan-ai/alan-sdk-web/index.js:5:22
at Object. (/Users/james/Work/ssrtest/node_modules/@alan-ai/alan-sdk-web/index.js:9:2)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at
hi could you create a custom wake-word?
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.