Change PATH constructor
This commit is contained in:
		
							parent
							
								
									9ffc2690c4
								
							
						
					
					
						commit
						8640f6a114
					
				|  | @ -96,4 +96,4 @@ Message transmitted is: HackThePlanet | ||||||
| 
 | 
 | ||||||
| Il arrive certaines fois que le message ne se déchiffre pas.  | Il arrive certaines fois que le message ne se déchiffre pas.  | ||||||
| 
 | 
 | ||||||
| Le problème n'est pas necore géré ... :) | Le problème n'est pas encore géré ... :) | ||||||
							
								
								
									
										13
									
								
								recorder.py
								
								
								
								
							
							
						
						
									
										13
									
								
								recorder.py
								
								
								
								
							|  | @ -1,6 +1,5 @@ | ||||||
| #!/usr/bin/env python | #!/usr/bin/env python | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| from pvrecorder import PvRecorder | from pvrecorder import PvRecorder | ||||||
| from pydub import AudioSegment | from pydub import AudioSegment | ||||||
| from scipy.io import wavfile | from scipy.io import wavfile | ||||||
|  | @ -11,6 +10,7 @@ import sys, os | ||||||
| import struct | import struct | ||||||
| import wave | import wave | ||||||
| 
 | 
 | ||||||
|  | AUTHOR = "Snorky" | ||||||
| VERSION = 0.1 | VERSION = 0.1 | ||||||
| 
 | 
 | ||||||
| def detect_frequency(file_path, duration=60): | def detect_frequency(file_path, duration=60): | ||||||
|  | @ -336,10 +336,11 @@ def welcome(): | ||||||
|  / _, _/  __/ /__/ /_/ / /  / /_/ /  __/ /     |  / _, _/  __/ /__/ /_/ / /  / /_/ /  __/ /     | ||||||
| /_/ |_|\___/\___/\____/_/   \__,_/\___/_/      | /_/ |_|\___/\___/\____/_/   \__,_/\___/_/      | ||||||
| 
 | 
 | ||||||
|                 Author: Snorky |                 Author: {AUTHOR} | ||||||
|                 Version : {VERSION}                                 |                 Version : {VERSION}                                 | ||||||
| """) | """) | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| def main(): | def main(): | ||||||
| 
 | 
 | ||||||
|     welcome() |     welcome() | ||||||
|  | @ -348,9 +349,13 @@ def main(): | ||||||
|     showArgs(parser) |     showArgs(parser) | ||||||
| 
 | 
 | ||||||
|     verbosity = False |     verbosity = False | ||||||
|     root_path = "/home/" + os.getlogin() + "/.cache/recorder" |     """     root_path = "/home/" + os.getlogin() + "/.cache/recorder" | ||||||
|     tmp_dir_path = root_path + "/tmp" |     tmp_dir_path = root_path + "/tmp" | ||||||
|     wave_dir_path = root_path + "/wave" |     wave_dir_path = root_path + "/wave" """ | ||||||
|  | 
 | ||||||
|  |     root_path = os.path.join(os.path.expanduser('~'), ".cache/recorder") | ||||||
|  |     tmp_dir_path = os.path.join(root_path, "tmp") | ||||||
|  |     wave_dir_path = os.path.join(root_path, "wave") | ||||||
|     checkEnv(root_path, tmp_dir_path, wave_dir_path) |     checkEnv(root_path, tmp_dir_path, wave_dir_path) | ||||||
|   |   | ||||||
|     if args.show_devices: |     if args.show_devices: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Snorky
						Snorky