dmed-voice-assistant 1.2.12 → 1.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/recorder.js +14 -10
- package/package.json +1 -1
package/dist/recorder.js
CHANGED
@@ -104,16 +104,20 @@ const RecorderBox = _ref => {
|
|
104
104
|
} = _ref2;
|
105
105
|
let temp = [...recordList];
|
106
106
|
const newVoice = {
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
time: await getAudioDuration(blob)
|
107
|
+
voice_file: URL.createObjectURL(blob),
|
108
|
+
file_name: newRecordFileName,
|
109
|
+
voice_size: blob.size,
|
110
|
+
voice_duration: await getAudioDuration(blob)
|
112
111
|
};
|
113
112
|
temp.push(newVoice);
|
114
113
|
setRecordList(temp);
|
115
114
|
if (onNewRecordEvent) {
|
116
|
-
onNewRecordEvent(
|
115
|
+
onNewRecordEvent({
|
116
|
+
fileName: getVoiceFileName(new Date()),
|
117
|
+
audioBlob: blob,
|
118
|
+
lang: selectedLanguage === 0 || selectedLanguage === 1 ? "en-US" : "zh-TW",
|
119
|
+
date: new Date()
|
120
|
+
});
|
117
121
|
}
|
118
122
|
if (onRecordDataChange) {
|
119
123
|
onRecordDataChange(temp);
|
@@ -580,10 +584,10 @@ const RecorderBox = _ref => {
|
|
580
584
|
},
|
581
585
|
children: recordList.map((record, index) => {
|
582
586
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RecordListItem.default, {
|
583
|
-
audioURL: record.
|
584
|
-
label: record.
|
585
|
-
capacity: record.
|
586
|
-
time: record.
|
587
|
+
audioURL: record.voice_file,
|
588
|
+
label: record.file_name,
|
589
|
+
capacity: record.voice_size,
|
590
|
+
time: parseInt(record.voice_duration),
|
587
591
|
createdDate: record.date,
|
588
592
|
onLabelChange: newLabel => handleLabelChange(index, newLabel),
|
589
593
|
onDelete: () => handleDelete(index)
|