Skip to content

Commit

Permalink
update demo and test
Browse files Browse the repository at this point in the history
  • Loading branch information
ksyeo1010 committed Nov 23, 2023
1 parent af717e1 commit c76ecec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion binding/react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1303'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1305'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
google()
mavenCentral()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1303'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1305'
}
}
dependencies {
Expand Down
4 changes: 2 additions & 2 deletions demo/react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
google()
jcenter()
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1303'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1305'
}
}
dependencies {
Expand All @@ -37,7 +37,7 @@ allprojects {
jcenter()
maven { url 'https://www.jitpack.io' }
maven {
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1303'
url 'https://s01.oss.sonatype.org/content/repositories/aipicovoice-1305'
}
}
}
8 changes: 5 additions & 3 deletions demo/react-native/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ export default class App extends Component<Props, State> {

handleError(err: any) {
let errorMessage = '';
if (err instanceof LeopardErrors.LeopardInvalidArgumentError) {
errorMessage = `${err.message}\nPlease make sure accessKey ${this._accessKey} is a valid access key.`;
} else if (err instanceof LeopardErrors.LeopardActivationError) {
if (err instanceof LeopardErrors.LeopardActivationError) {
errorMessage = 'AccessKey activation error';
} else if (err instanceof LeopardErrors.LeopardActivationLimitError) {
errorMessage = 'AccessKey reached its device limit';
} else if (err instanceof LeopardErrors.LeopardActivationRefusedError) {
errorMessage = 'AccessKey refused';
} else if (err instanceof LeopardErrors.LeopardActivationThrottledError) {
errorMessage = 'AccessKey has been throttled';
} else if (err instanceof LeopardErrors.LeopardError) {
errorMessage = err.message;
} else {
errorMessage = err.toString();
}
Expand Down Expand Up @@ -225,6 +225,7 @@ export default class App extends Component<Props, State> {
<Text style={styles.wordText}>{`${(word.confidence * 100).toFixed(
0,
)}%`}</Text>
<Text style={styles.wordText}>{word.speakerTag}</Text>
</View>
);
}
Expand Down Expand Up @@ -260,6 +261,7 @@ export default class App extends Component<Props, State> {
<Text style={styles.wordCell}>Start</Text>
<Text style={styles.wordCell}>End</Text>
<Text style={styles.wordCell}>Confidence</Text>
<Text style={styles.wordCell}>Speaker Tag</Text>
</View>
<ScrollView style={styles.wordBox}>
{this.state.words.map((word: LeopardWord, index: number) =>
Expand Down

0 comments on commit c76ecec

Please sign in to comment.