forked from React-Group/interstellar_ai
voice recognition trial 1
This commit is contained in:
parent
edc7260966
commit
0d84454a17
5 changed files with 74 additions and 88 deletions
|
@ -1,16 +1,10 @@
|
|||
import axios from "axios";
|
||||
|
||||
class VoiceSend {
|
||||
|
||||
voiceDataTemplate = {
|
||||
type: "basic",
|
||||
audio_data: null,
|
||||
option: "offline"
|
||||
}
|
||||
|
||||
sendToVoiceRecognition(audio_data: Blob, data: any) {
|
||||
var dataSend = data
|
||||
dataSend['audio_data'] = audio_data
|
||||
sendToVoiceRecognition(audio_data: Blob) {
|
||||
console.log("sending recording...");
|
||||
|
||||
const dataSend = { audio_data }
|
||||
axios.post("http://localhost:5000/interstellar_ai/api/voice_recognition", dataSend)
|
||||
.then((response: any) => {
|
||||
console.log(response['response'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue