Skip to content

Commit

Permalink
react-voice-native
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Pacella committed Sep 2, 2019
0 parents commit bd5e462
Show file tree
Hide file tree
Showing 35,276 changed files with 5,090,027 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules/**/*
.expo/*
npm-debug.*
*.jks
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
web-report/
.npmrc
yarn-error.log
.idea/
coverage/
.vscode/
60 changes: 60 additions & 0 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import React, {Component} from 'react';
import {Button, StyleSheet, Text, View} from 'react-native';

import Voice from 'react-native-voice';


export default class App extends Component{
state = {
listening: "pause",
complete: '',
partial: '',
};
constructor(props) {
super(props);
Voice.onSpeechStart = this.onSpeechStartHandler.bind(this);
Voice.onSpeechEnd = this.onSpeechEndHandler.bind(this);
Voice.onSpeechError = this.onSpeechError.bind(this);
Voice.onSpeechResults = this.onSpeechResultsHandler.bind(this);
Voice.onSpeechPartialResults = this.onSpeechPartialHandler.bind(this);
}

onSpeechResultsHandler(result){
console.log("result start", result)
this.setState({complete: result.value})
}

onSpeechPartialHandler(result){
console.log("result partial", result)
this.setState({partial: result.value})
}

onSpeechStartHandler(){
this.setState({listening:"started"})
console.log("speech started")
}

onSpeechEndHandler(result){
console.log("result stop", result)
this.setState({listening:"pause"})
}
onSpeechError(err){
console.log(err)
}

render() {
return (
<View>
<Text>Prova2</Text>
<Text>react-native-voice Test</Text>
<Button title={'start'} onPress={(e) => {
console.log("start")
Voice.onSpeechStart = this.onSpeechStartHandler.bind(this);
Voice.start("it-IT");
}}/>
<Text>Ascolto {this.state.listening}</Text>
<Text>Che cosa hai detto? {this.state.complete}</Text>
<Text>Partial {this.state.partial}</Text>
</View>
)
}}
19 changes: 19 additions & 0 deletions App.tsx.bck
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.tsx to start working on your app!</Text>
</View>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Binary file not shown.
Binary file not shown.
Binary file added android/.gradle/4.10.1/fileHashes/fileHashes.lock
Binary file not shown.
Empty file.
Binary file not shown.
Binary file added android/.gradle/4.10.1/taskHistory/taskHistory.lock
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions android/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Thu Aug 29 15:00:01 CEST 2019
gradle.version=4.10.1
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions android/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added android/.idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file added android/.idea/caches/gradle_models.ser
Binary file not shown.
116 changes: 116 additions & 0 deletions android/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions android/.idea/dictionaries/moveax.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions android/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bd5e462

Please sign in to comment.