2019-02-10 15:26:50 +03:00
|
|
|
import dotenv from 'dotenv'
|
|
|
|
|
2022-09-16 21:58:24 +03:00
|
|
|
import { loader } from '@/helpers/loader'
|
2022-09-16 20:36:58 +03:00
|
|
|
import { log } from '@/helpers/log'
|
2019-02-10 15:26:50 +03:00
|
|
|
|
|
|
|
import checkOs from '../check-os'
|
|
|
|
import setupHotword from './setup-hotword'
|
|
|
|
import setupTts from './setup-tts'
|
|
|
|
import setupStt from './setup-stt'
|
|
|
|
|
2022-09-03 14:12:41 +03:00
|
|
|
dotenv.config()
|
2019-02-10 15:26:50 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Main entry to setup offline components
|
|
|
|
*/
|
2022-09-03 14:12:41 +03:00
|
|
|
;(async () => {
|
2019-02-10 15:26:50 +03:00
|
|
|
try {
|
|
|
|
loader.start()
|
|
|
|
await checkOs()
|
|
|
|
loader.stop()
|
|
|
|
await setupHotword()
|
|
|
|
loader.start()
|
|
|
|
await setupTts()
|
|
|
|
await setupStt()
|
|
|
|
|
|
|
|
loader.stop()
|
|
|
|
log.success('Hooray! Offline components are installed!')
|
|
|
|
} catch (e) {
|
|
|
|
log.error(e)
|
|
|
|
loader.stop()
|
|
|
|
}
|
|
|
|
})()
|