| 
														
															@@ -389,17 +389,17 @@ import startPage from "./startPage"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import transcription from "./transcription"; 
														 | 
														
														 | 
														
															 import transcription from "./transcription"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import tape from "./tape"; 
														 | 
														
														 | 
														
															 import tape from "./tape"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import { v4 as uuidv4 } from "uuid"; 
														 | 
														
														 | 
														
															 import { v4 as uuidv4 } from "uuid"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-import Recorder from "js-audio-recorder"; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// import Recorder from "js-audio-recorder"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import MarkdownIt from "markdown-it"; 
														 | 
														
														 | 
														
															 import MarkdownIt from "markdown-it"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import EditorBar from "./wangEnduit"; 
														 | 
														
														 | 
														
															 import EditorBar from "./wangEnduit"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 const lamejs = require("lamejs"); 
														 | 
														
														 | 
														
															 const lamejs = require("lamejs"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import vpdf from "./vpdf"; 
														 | 
														
														 | 
														
															 import vpdf from "./vpdf"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-const recorder = new Recorder({ 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	sampleBits: 16, // 采样位数,支持 8 或 16,默认是16 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	sampleRate: 48000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	numChannels: 1, // 声道,支持 1 或 2, 默认是1 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	// compiling: false,(0.x版本中生效,1.x增加中) // 是否边录边转换,默认是false 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-}); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// const recorder = new Recorder({ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// 	sampleBits: 16, // 采样位数,支持 8 或 16,默认是16 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// 	sampleRate: 48000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// 	numChannels: 1, // 声道,支持 1 或 2, 默认是1 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// 	// compiling: false,(0.x版本中生效,1.x增加中) // 是否边录边转换,默认是false 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+// }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 // 绑定事件-打印的是当前录音数据 
														 | 
														
														 | 
														
															 // 绑定事件-打印的是当前录音数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 // recorder.onprogress = function (params) { 
														 | 
														
														 | 
														
															 // recorder.onprogress = function (params) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -725,6 +725,8 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				this.recordedForm.timeDuration = 0; 
														 | 
														
														 | 
														
															 				this.recordedForm.timeDuration = 0; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				this.recordedForm.startTime = 1; 
														 | 
														
														 | 
														
															 				this.recordedForm.startTime = 1; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				this.recordedForm.endTime = 0; 
														 | 
														
														 | 
														
															 				this.recordedForm.endTime = 0; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.showIndexPage = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+				this.pageStatus = 2; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				// 录音开始 
														 | 
														
														 | 
														
															 				// 录音开始 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 				iiframe.contentWindow.onRecognizedResult = (e) => { 
														 | 
														
														 | 
														
															 				iiframe.contentWindow.onRecognizedResult = (e) => { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					// let e = { 
														 | 
														
														 | 
														
															 					// let e = { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -734,7 +736,7 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					if (flag) { 
														 | 
														
														 | 
														
															 					if (flag) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						this.controlsStatus = 1; 
														 | 
														
														 | 
														
															 						this.controlsStatus = 1; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						this.showIndexPage = false; 
														 | 
														
														 | 
														
															 						this.showIndexPage = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-						this.pageStatus = 1; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+						this.pageStatus = 2; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						this.editorBarData.type = "0"; 
														 | 
														
														 | 
														
															 						this.editorBarData.type = "0"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						flag = false; 
														 | 
														
														 | 
														
															 						flag = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 						this.uploadFileLoading = false; 
														 | 
														
														 | 
														
															 						this.uploadFileLoading = false; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1312,42 +1314,42 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		noShowRoleList() { 
														 | 
														
														 | 
														
															 		noShowRoleList() { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			this.showRoleList = false; 
														 | 
														
														 | 
														
															 			this.showRoleList = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		}, 
														 | 
														
														 | 
														
															 		}, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		convertToMp3(wavDataView) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			// 获取wav头信息 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const wav = lamejs.WavHeader.readHeader(wavDataView); // 此处其实可以不用去读wav头信息,毕竟有对应的config配置 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const { channels, sampleRate } = wav; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const mp3enc = new lamejs.Mp3Encoder(channels, sampleRate, 128); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			// 获取左右通道数据 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const result = recorder.getChannelData(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const buffer = []; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const leftData = 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				result.left && 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				new Int16Array(result.left.buffer, 0, result.left.byteLength / 2); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const rightData = 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				result.right && 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				new Int16Array(result.right.buffer, 0, result.right.byteLength / 2); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const remaining = leftData.length + (rightData ? rightData.length : 0); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const maxSamples = 1152; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			for (let i = 0; i < remaining; i += maxSamples) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				const left = leftData.subarray(i, i + maxSamples); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				let right = null; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				let mp3buf = null; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				if (channels === 2) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					right = rightData.subarray(i, i + maxSamples); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					mp3buf = mp3enc.encodeBuffer(left, right); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				} else { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					mp3buf = mp3enc.encodeBuffer(left); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				if (mp3buf.length > 0) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					buffer.push(mp3buf); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			const enc = mp3enc.flush(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			if (enc.length > 0) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-				buffer.push(enc); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			} 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-			return new Blob(buffer, { type: "audio/mp3" }); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-		}, 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// convertToMp3(wavDataView) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	// 获取wav头信息 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const wav = lamejs.WavHeader.readHeader(wavDataView); // 此处其实可以不用去读wav头信息,毕竟有对应的config配置 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const { channels, sampleRate } = wav; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const mp3enc = new lamejs.Mp3Encoder(channels, sampleRate, 128); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	// 获取左右通道数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const result = recorder.getChannelData(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const buffer = []; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const leftData = 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		result.left && 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		new Int16Array(result.left.buffer, 0, result.left.byteLength / 2); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const rightData = 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		result.right && 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		new Int16Array(result.right.buffer, 0, result.right.byteLength / 2); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const remaining = leftData.length + (rightData ? rightData.length : 0); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const maxSamples = 1152; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	for (let i = 0; i < remaining; i += maxSamples) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		const left = leftData.subarray(i, i + maxSamples); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		let right = null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		let mp3buf = null; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		if (channels === 2) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 			right = rightData.subarray(i, i + maxSamples); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 			mp3buf = mp3enc.encodeBuffer(left, right); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		} else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 			mp3buf = mp3enc.encodeBuffer(left); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		if (mp3buf.length > 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 			buffer.push(mp3buf); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	const enc = mp3enc.flush(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	if (enc.length > 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 		buffer.push(enc); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// 	return new Blob(buffer, { type: "audio/mp3" }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		// }, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		wavFileGetText(audioFile) { 
														 | 
														
														 | 
														
															 		wavFileGetText(audioFile) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			let flag = true; 
														 | 
														
														 | 
														
															 			let flag = true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			let textList = []; 
														 | 
														
														 | 
														
															 			let textList = []; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1364,7 +1366,7 @@ export default { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					// _this.uploadWavFile(audioFile); 
														 | 
														
														 | 
														
															 					// _this.uploadWavFile(audioFile); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					_this.controlsStatus = 2; 
														 | 
														
														 | 
														
															 					_this.controlsStatus = 2; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					_this.showIndexPage = false; 
														 | 
														
														 | 
														
															 					_this.showIndexPage = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-					_this.pageStatus = 1; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+					_this.pageStatus = 2; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					_this.editorBarData.type = "0"; 
														 | 
														
														 | 
														
															 					_this.editorBarData.type = "0"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					flag = false; 
														 | 
														
														 | 
														
															 					flag = false; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 					_this.uploadFileLoading = false; 
														 | 
														
														 | 
														
															 					_this.uploadFileLoading = false; 
														 |