diff --git a/tts_frontend/src/App.css b/tts_frontend/src/App.css index fca59d8040..c7bbf60f5b 100644 --- a/tts_frontend/src/App.css +++ b/tts_frontend/src/App.css @@ -2,41 +2,6 @@ text-align: center; } -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - .track { margin: 10px auto; width: 600px; @@ -50,6 +15,7 @@ size: 4em; padding: 1em; background-color: #ccc; + cursor: pointer; } .track_text { diff --git a/tts_frontend/src/App.tsx b/tts_frontend/src/App.tsx index d51a51dcf4..8f17837ac1 100644 --- a/tts_frontend/src/App.tsx +++ b/tts_frontend/src/App.tsx @@ -5,7 +5,7 @@ import { MainComponent } from './components/MainComponent'; const App: React.FC = () => { return (
-

Test2

+

Neural TTS

); diff --git a/tts_frontend/src/components/TextAudioTrack.tsx b/tts_frontend/src/components/TextAudioTrack.tsx index 1b66a63d21..1695563076 100644 --- a/tts_frontend/src/components/TextAudioTrack.tsx +++ b/tts_frontend/src/components/TextAudioTrack.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import Howl from 'howler'; +import {makeTtsRequest} from '../TtsService' interface Props { text: String, @@ -22,6 +23,12 @@ class TextAudioTrack extends React.Component { reload = () => { console.log('Reload clicked'); + + const sentence = this.props.text.toString(); + + makeTtsRequest(sentence).then(response => { + response.howl.play(); + }); } public render() {