robinnarsinghranabhat / Audio-Stream-flask

Web application for my voice-recognition model to aid podcast listening
0 stars 0 forks source link

cannot receive data on remote server #1

Open 6273parastu opened 1 year ago

6273parastu commented 1 year ago

Hi, I developed simple project with flask soket io and try to get real time voice in backend. in localhost it works and receive data but when i run it in remote server it doesn`t work.

@socketio.on('write-audio')
def write_audio(data):
    """Write a chunk of audio from the client."""
    print(type(data))

@socketio.on('connect')
def on_connect():
    print('on_connect')
    socketio.start_background_task(target=target_class.background_thread_from_stream, app=current_app._get_current_object())
socket.on('connect', function() {
    console.log('CONNECTION ESTABLISHED !!')
});
soket.emit('write-audio', buffer)
6273parastu commented 1 year ago

Request URL: http://192.168.35.2:6300/socket.io/?EIO=4&transport=polling&t=OK5QrnD&sid=y4YTNdrdFiHu-p6rAACa Request Method: GET Status Code: 400 BAD REQUEST "Invalid session"