Merge pull request 'Backend fixes by Yasin' (#24) from React-Group/interstellar_ai:main into main
Reviewed-on: https://interstellardevelopment.org/code/code/sageTheDm/interstellar_ai/pulls/24
This commit is contained in:
		
						commit
						a46f139566
					
				
					 4 changed files with 52 additions and 2 deletions
				
			
		|  | @ -29,12 +29,13 @@ const modelDropdown = { | ||||||
| 
 | 
 | ||||||
| const Models: React.FC = () => { | const Models: React.FC = () => { | ||||||
|   // Initialize state with value from localStorage or default to ''
 |   // Initialize state with value from localStorage or default to ''
 | ||||||
|   const [radioSelection, setRadioSelection] = useState(() => localStorage.getItem('radioSelection') || ''); |   const [radioSelection, setRadioSelection] = useState(''); | ||||||
| 
 |    | ||||||
|   useEffect(() => { |   useEffect(() => { | ||||||
|     const handleStorageChange = () => { |     const handleStorageChange = () => { | ||||||
|       setRadioSelection(localStorage.getItem('radioSelection') || ''); |       setRadioSelection(localStorage.getItem('radioSelection') || ''); | ||||||
|     }; |     }; | ||||||
|  |     handleStorageChange() | ||||||
| 
 | 
 | ||||||
|     // Update dropdown immediately when localStorage changes internally or externally
 |     // Update dropdown immediately when localStorage changes internally or externally
 | ||||||
|     window.addEventListener('storage', handleStorageChange); |     window.addEventListener('storage', handleStorageChange); | ||||||
|  |  | ||||||
							
								
								
									
										43
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										43
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							|  | @ -8,6 +8,10 @@ | ||||||
|       "name": "interstellar_ai", |       "name": "interstellar_ai", | ||||||
|       "version": "0.1.0", |       "version": "0.1.0", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|  |         "@ffmpeg/core-mt": "^0.12.6", | ||||||
|  |         "@ffmpeg/ffmpeg": "^0.12.10", | ||||||
|  |         "@ffmpeg/types": "^0.12.2", | ||||||
|  |         "@ffmpeg/util": "^0.12.1", | ||||||
|         "@mistralai/mistralai": "^1.0.4", |         "@mistralai/mistralai": "^1.0.4", | ||||||
|         "axios": "^1.7.7", |         "axios": "^1.7.7", | ||||||
|         "electron": "^32.1.2", |         "electron": "^32.1.2", | ||||||
|  | @ -132,6 +136,45 @@ | ||||||
|         "node": "^12.22.0 || ^14.17.0 || >=16.0.0" |         "node": "^12.22.0 || ^14.17.0 || >=16.0.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/@ffmpeg/core-mt": { | ||||||
|  |       "version": "0.12.6", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@ffmpeg/core-mt/-/core-mt-0.12.6.tgz", | ||||||
|  |       "integrity": "sha512-f7wrOeUk24VFRi2Gfsp/mwwkK1hbDV0ajgm2fOU/oRi+IDullyzAYdHOagAWfpSZXcTPAGZ1Ild7HmBwr3k2tg==", | ||||||
|  |       "license": "MIT", | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=16.x" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@ffmpeg/ffmpeg": { | ||||||
|  |       "version": "0.12.10", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@ffmpeg/ffmpeg/-/ffmpeg-0.12.10.tgz", | ||||||
|  |       "integrity": "sha512-lVtk8PW8e+NUzGZhPTWj2P1J4/NyuCrbDD3O9IGpSeLYtUZKBqZO8CNj1WYGghep/MXoM8e1qVY1GztTkf8YYQ==", | ||||||
|  |       "license": "MIT", | ||||||
|  |       "dependencies": { | ||||||
|  |         "@ffmpeg/types": "^0.12.2" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=18.x" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@ffmpeg/types": { | ||||||
|  |       "version": "0.12.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@ffmpeg/types/-/types-0.12.2.tgz", | ||||||
|  |       "integrity": "sha512-NJtxwPoLb60/z1Klv0ueshguWQ/7mNm106qdHkB4HL49LXszjhjCCiL+ldHJGQ9ai2Igx0s4F24ghigy//ERdA==", | ||||||
|  |       "license": "MIT", | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=16.x" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/@ffmpeg/util": { | ||||||
|  |       "version": "0.12.1", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@ffmpeg/util/-/util-0.12.1.tgz", | ||||||
|  |       "integrity": "sha512-10jjfAKWaDyb8+nAkijcsi9wgz/y26LOc1NKJradNMyCIl6usQcBbhkjX5qhALrSBcOy6TOeksunTYa+a03qNQ==", | ||||||
|  |       "license": "MIT", | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=18.x" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|     "node_modules/@humanwhocodes/config-array": { |     "node_modules/@humanwhocodes/config-array": { | ||||||
|       "version": "0.13.0", |       "version": "0.13.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", |       "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", | ||||||
|  |  | ||||||
|  | @ -11,6 +11,10 @@ | ||||||
|     "electron": "npx electron . & next dev" |     "electron": "npx electron . & next dev" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|  |     "@ffmpeg/core-mt": "^0.12.6", | ||||||
|  |     "@ffmpeg/ffmpeg": "^0.12.10", | ||||||
|  |     "@ffmpeg/types": "^0.12.2", | ||||||
|  |     "@ffmpeg/util": "^0.12.1", | ||||||
|     "@mistralai/mistralai": "^1.0.4", |     "@mistralai/mistralai": "^1.0.4", | ||||||
|     "axios": "^1.7.7", |     "axios": "^1.7.7", | ||||||
|     "electron": "^32.1.2", |     "electron": "^32.1.2", | ||||||
|  |  | ||||||
|  | @ -22,3 +22,5 @@ class VoiceRecognition: | ||||||
|         result = model.transcribe(audio_data) |         result = model.transcribe(audio_data) | ||||||
|         print(result["text"]) |         print(result["text"]) | ||||||
|         return result["text"] |         return result["text"] | ||||||
|  | 
 | ||||||
|  | # npm install @ffmpeg/ffmpeg @ffmpeg/util @ffmpeg/types @ffmpeg/core-mt | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue