Skip to content

Instantly share code, notes, and snippets.

@dueka
Created April 29, 2023 14:51
Show Gist options
  • Save dueka/c2b6b8756899ff79796ff23b1fedaed1 to your computer and use it in GitHub Desktop.
Save dueka/c2b6b8756899ff79796ff23b1fedaed1 to your computer and use it in GitHub Desktop.
TranscribeOutput.tsx
import React from 'react';
import {Text, View, StyleSheet} from 'react-native';
const TranscribedOutput = ({transcribedText, interimTranscribedText}: any) => {
if (transcribedText.length === 0 && interimTranscribedText.length === 0) {
return <Text>...</Text>;
}
return (
<View style={styles.box}>
<Text style={styles.text}>{transcribedText}</Text>
<Text>{interimTranscribedText}</Text>
</View>
);
};
const styles = StyleSheet.create({
box: {
borderColor: 'black',
borderRadius: 10,
marginBottom: 0,
},
text: {
fontWeight: '400',
fontSize: 30,
},
});
export default TranscribedOutput;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment