forked from jan-leila/nix-config
		
	installed wyoming
This commit is contained in:
		
							parent
							
								
									0e8a148517
								
							
						
					
					
						commit
						2e8eba7709
					
				
					 3 changed files with 58 additions and 0 deletions
				
			
		
							
								
								
									
										50
									
								
								modules/nixos-modules/server/wyoming.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								modules/nixos-modules/server/wyoming.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,50 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   options.services.wyoming.enable = lib.mkEnableOption "should wyoming be enabled on this device"; | ||||
|   config = lib.mkIf config.services.wyoming.enable (lib.mkMerge [ | ||||
|     { | ||||
|       services.wyoming.piper = { | ||||
|         servers = { | ||||
|           "en" = { | ||||
|             enable = true; | ||||
|             # see https://github.com/rhasspy/rhasspy3/blob/master/programs/tts/piper/script/download.py | ||||
|             voice = "en-us-amy-low"; | ||||
|             uri = "tcp://0.0.0.0:10200"; | ||||
|             speaker = 0; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       services.wyoming.faster-whisper = { | ||||
|         servers = { | ||||
|           "en" = { | ||||
|             enable = true; | ||||
|             # see https://github.com/rhasspy/rhasspy3/blob/master/programs/asr/faster-whisper/script/download.py | ||||
|             model = "tiny-int8"; | ||||
|             language = "en"; | ||||
|             uri = "tcp://0.0.0.0:10300"; | ||||
|             device = "cpu"; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       # needs access to /proc/cpuinfo | ||||
|       systemd.services."wyoming-faster-whisper-en".serviceConfig.ProcSubset = lib.mkForce "all"; | ||||
|     } | ||||
|     (lib.mkIf config.host.impermanence.enable { | ||||
|       environment.persistence."/persist/system/root" = { | ||||
|         enable = true; | ||||
|         hideMounts = true; | ||||
|         directories = [ | ||||
|           { | ||||
|             directory = "/var/lib/private/wyoming"; | ||||
|             mode = "0700"; | ||||
|           } | ||||
|         ]; | ||||
|       }; | ||||
|     }) | ||||
|   ]); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue