Coverage for src/botadi/mokadi/gui_mokadi_process.py: 44%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

9 statements  

1# -*- coding: utf-8 -*- 

2""" 

3@file 

4@brief Second process to listen to the mike. Issue: two processes 

5cannot listen to the mike at the same time. 

6""" 

7 

8from multiprocessing import Process, Pipe 

9 

10 

11def process_listen(conn): 

12 raise NotImplementedError("Implementation was removed.") 

13 # from ensae_teaching_cs.cspython import vocal_recognition_listening 

14 # for score, text in vocal_recognition_listening(): 

15 # conn.send(text) 

16 # conn.close() 

17 

18 

19def start_process_listen(): 

20 parent_conn, child_conn = Pipe() 

21 p = Process(target=process_listen, args=(child_conn,)) 

22 p.start() 

23 return p, parent_conn, child_conn