title: Multiprocessing not working with python websockets
body: <p>I have a python server which is used to play a different audio file for each char that is taken in input from a client in javascript. I need to terminate the audio when the server receive the 'z' char but when an audio is playing the server does not receive any input from the client until the audio ends, then it lets me play another audio (something like the multiprocessing is not working at all).</p>
  <pre><code>
  import websockets
  import asyncio
  from audio.PlayAudio import PlaySound
  import multiprocessing as mp
  
  HOST = &quot;192.168.43.149&quot;
  PORT = 8484
  
  print(&quot;Server listening on Port &quot; + str(PORT) + &quot; ip: &quot; + HOST) 
  
  async def socket(websocket):
      print(&quot;A client just connected&quot;)
  
      async for message in websocket:
              print(&quot;Received message from client: &quot; + message)
              if message == 'a':   
                  i=&quot;0&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'b':
                  i=&quot;1&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'c':
                  i=&quot;2&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'd':
                  i=&quot;3&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'e':
                  i=&quot;4&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'f':
                  i=&quot;5&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'g':
                  i=&quot;6&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'h':
                  i=&quot;7&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'i':
                  i=&quot;8&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'j':
                  i=&quot;9&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'k':
                  i=&quot;10&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'l':
                  i=&quot;11&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'm':
                  i=&quot;12&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'n':
                  i=&quot;13&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'o':
                  i=&quot;14&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'p':
                  i=&quot;15&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'q':
                  i=&quot;16&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'r':
                  i=&quot;17&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 's':
                  i=&quot;18&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 't':
                  i=&quot;19&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'u':
                  i=&quot;20&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'v':
                  i=&quot;21&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'w':
                  i=&quot;22&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'x':
                  i=&quot;23&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'y':
                  i=&quot;24&quot;
                  p = mp.Process(target=PlaySound, args=i)
                  p.run()
              elif message == 'z':
                  p.kill()
  
  start_server = websockets.serve(socket, HOST, PORT)
  
  asyncio.get_event_loop().run_until_complete(start_server)
  asyncio.get_event_loop().run_forever()
  
  </code></pre>
  <p>How can i solve this problem? I have also tried to use playsound but it has the same problem.</p>