Closed chuckTH closed 12 months ago
Hey @chuckTH - did you use the Whisper with the Restful API wrapper around it? Make sure you can make the calls via cURL or that you can access the API's docs so you can make some dummy calls and see if it all works. Once you made sure it works, then you can fiddle with the settings.
I used this project: https://github.com/ahmetoner/whisper-asr-webservice
I have Whisper and Mimic running on a server, when trying to make a request from the mirror, I get this axios error:
`[14.09.2023 12:26.49.147] [ERROR] Error uploading file: AxiosError: connect ECONNREFUSED ::1:80 at AxiosError.from (/home/pi/MagicMirror/modules/MMM-WhisperGPT/node_modules/axios/dist/node/axios.cjs:836:14) at RedirectableRequest.handleRequestError (/home/pi/MagicMirror/modules/MMM-WhisperGPT/node_modules/axios/dist/node/axios.cjs:3010:25) at RedirectableRequest.emit (node:events:526:35) at eventHandlers. (/home/pi/MagicMirror/modules/MMM-WhisperGPT/node_modules/follow-redirects/index.js:14:24)
at ClientRequest.emit (node:events:514:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:514:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
port: 80,
address: '::1',
syscall: 'connect',
code: 'ECONNREFUSED',
errno: -111,
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: { FormData: [Function], Blob: [class Blob] },
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
Accept: 'application/json, text/plain, /',
'Content-Type': 'multipart/form-data; boundary=--------------------------751421172292702686143612',
'User-Agent': 'axios/1.4.0',
'Content-Length': '122615',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
params: {
method: 'openai-whisper',
task: 'transcribe',
language: 'en',
encode: true,
output: 'json'
},
method: 'post',
url: '192.168.0.18:9000/asr',
data: FormData {
_overheadLength: 159,
_valueLength: 0,
_valuesToMeasure: [Array],
writable: true,
readable: true,
dataSize: 0,
maxDataSize: 2097152,
pauseStreams: true,
_released: true,
_streams: [Array],
_currentStream: [DelayedStream],
_insideLoop: false,
_pendingNext: false,
_boundary: '--------------------------751421172292702686143612',
_events: [Object: null prototype],
_eventsCount: 4
}
},
request: <ref *1> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
}, cause: Error: connect ECONNREFUSED ::1:80 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 80 } } [14.09.2023 12:26.49.157] [ERROR] Whoops! There was an uncaught exception... [14.09.2023 12:26.49.158] [ERROR] TypeError: Cannot read properties of undefined (reading 'toLowerCase') at Class.stopRecording (/home/pi/MagicMirror/modules/MMM-WhisperGPT/node_helper.js:213:23) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) `
Calls my attention this part:
_currentUrl: 'http://localhost/192.168.0.18:9000/asr?method=openai-