Test VScode commit
This commit is contained in:
		
							parent
							
								
									f1721370fb
								
							
						
					
					
						commit
						2255775801
					
				|  | @ -82,7 +82,6 @@ def getArgs(parser): | ||||||
|     return: |     return: | ||||||
|         parser parser. |         parser parser. | ||||||
|     """ |     """ | ||||||
| 
 |  | ||||||
|     parser.add_argument( |     parser.add_argument( | ||||||
|         "-s","--show_devices", |         "-s","--show_devices", | ||||||
|         help="List of audio devices currently available for use.", |         help="List of audio devices currently available for use.", | ||||||
|  | @ -130,9 +129,7 @@ def saving(audio, output_name, rate, len_frame, wave_dir_path): | ||||||
|         output_name: str |         output_name: str | ||||||
|         rate: int. Audio rate. |         rate: int. Audio rate. | ||||||
|         len_frame: int. Length of frame |         len_frame: int. Length of frame | ||||||
| 
 |  | ||||||
|     """ |     """ | ||||||
| 
 |  | ||||||
|     print(f"\nSaving wav file: {wave_dir_path}/{output_name}.") |     print(f"\nSaving wav file: {wave_dir_path}/{output_name}.") | ||||||
| 
 | 
 | ||||||
|     try:  |     try:  | ||||||
|  | @ -164,7 +161,6 @@ def recording(dev_index,output_name,rate,len_frame, wave_dir_path): | ||||||
|     Return: |     Return: | ||||||
|         data and length (in sec) of them. |         data and length (in sec) of them. | ||||||
|     """ |     """ | ||||||
| 
 |  | ||||||
|     # Create object for recording |     # Create object for recording | ||||||
|     recorder = PvRecorder(device_index=dev_index, frame_length=len_frame) |     recorder = PvRecorder(device_index=dev_index, frame_length=len_frame) | ||||||
|      |      | ||||||
|  | @ -260,7 +256,6 @@ def readBits(bits_tab_wave): | ||||||
|         Message in binary |         Message in binary | ||||||
|   |   | ||||||
|     """ |     """ | ||||||
| 
 |  | ||||||
|     bits_message = [] |     bits_message = [] | ||||||
|     print("Extracting data from wav file:") |     print("Extracting data from wav file:") | ||||||
|     for waves in bits_tab_wave: |     for waves in bits_tab_wave: | ||||||
|  | @ -275,7 +270,6 @@ def readBits(bits_tab_wave): | ||||||
|             bits_message.append(1) |             bits_message.append(1) | ||||||
|          |          | ||||||
|         sys.stdout.flush() |         sys.stdout.flush() | ||||||
| 
 |  | ||||||
|     return bits_message |     return bits_message | ||||||
|   |   | ||||||
| 
 | 
 | ||||||
|  | @ -295,7 +289,6 @@ def decodeMessage(message): | ||||||
|     Return: |     Return: | ||||||
|         Message decoded. |         Message decoded. | ||||||
|     """ |     """ | ||||||
| 
 |  | ||||||
|     print("\nDecoding message:") |     print("\nDecoding message:") | ||||||
|      |      | ||||||
|     i = 0 |     i = 0 | ||||||
|  | @ -322,12 +315,10 @@ def decodeMessage(message): | ||||||
|         else: |         else: | ||||||
|             i += 1 |             i += 1 | ||||||
|         print(".", end='') |         print(".", end='') | ||||||
| 
 |  | ||||||
|     return final_message |     return final_message | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def checkEnv(root_path, tmp_dir_path, wave_dir_path): | def checkEnv(root_path, tmp_dir_path, wave_dir_path): | ||||||
| 
 |  | ||||||
|     for dir in (root_path, tmp_dir_path, wave_dir_path): |     for dir in (root_path, tmp_dir_path, wave_dir_path): | ||||||
|         if not os.path.exists(dir): |         if not os.path.exists(dir): | ||||||
|             try: |             try: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Snorky
						Snorky