Skip to content

Commit ad25811

Browse files
author
Mateusz Kopciński
committed
fixed some more styling on example app
1 parent d9b5893 commit ad25811

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

examples/speech-to-text/screens/SpeechToTextScreen.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const styles = StyleSheet.create({
234234
flex: 1,
235235
justifyContent: 'center',
236236
alignItems: 'center',
237-
marginBottom: 100,
237+
marginBottom: 20,
238238
},
239239
recordingButtonWrapper: {
240240
flex: 1,
@@ -267,8 +267,8 @@ const styles = StyleSheet.create({
267267
fontWeight: '600',
268268
},
269269
transcriptionContainer: {
270-
flex: 9,
271-
paddingTop: 100,
270+
flex: 5,
271+
paddingTop: 80,
272272
width: '90%',
273273
},
274274
transcriptionText: {

src/controllers/SpeechToTextController.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ export class SpeechToTextController {
249249
this.decodedTranscribeCallback(prevseq);
250250
}
251251
}
252+
if (this.chunks.length == 1) {
253+
final_seq = seq;
254+
this.sequence = final_seq;
255+
this.decodedTranscribeCallback(final_seq);
256+
break;
257+
}
252258
// remove sos/eos token and 3 additional ones
253259
if (seqs.length === 0) {
254260
seqs = [seq.slice(0, -4)];
@@ -260,12 +266,6 @@ export class SpeechToTextController {
260266
} else {
261267
seqs = [...seqs, seq.slice(4, -4)];
262268
}
263-
if (this.chunks.length == 1) {
264-
final_seq = seqs[0]!;
265-
this.sequence = final_seq;
266-
this.decodedTranscribeCallback(final_seq);
267-
break;
268-
}
269269
if (seqs.length < 2) {
270270
continue;
271271
}

0 commit comments

Comments
 (0)