feat: sistema de observação por voz - fase 1
- FAB flutuante para gravar observação - Modal com timer + waveform animado - Botão sair para desistir - MediaRecorder API (webm/opus) - Transcrição via OpenAI Whisper - Relatório estruturado via GPT - Salva em .md com frontmatter (data/hora/timestamp) - Índice JSON para consulta posterior - Rotas: transcrever, salvar, listar observações - multer para upload de áudio
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
var concat = require('concat-stream')
|
||||
|
||||
function MemoryStorage (opts) {}
|
||||
|
||||
MemoryStorage.prototype._handleFile = function _handleFile (req, file, cb) {
|
||||
file.stream.pipe(concat({ encoding: 'buffer' }, function (data) {
|
||||
cb(null, {
|
||||
buffer: data,
|
||||
size: data.length
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
MemoryStorage.prototype._removeFile = function _removeFile (req, file, cb) {
|
||||
delete file.buffer
|
||||
cb(null)
|
||||
}
|
||||
|
||||
module.exports = function (opts) {
|
||||
return new MemoryStorage(opts)
|
||||
}
|
||||
Reference in New Issue
Block a user