| 123456789101112131415161718192021 |
- import { ToolVoiceEval } from '@/api/app';
- /**
- * 录音评分
- */
- export function recordSocreSingle(data) {
- return ToolVoiceEval({
- audio_bytes_base64: data.audio_paramter_type === 0 ? String(data.base64).replace(/^data:audio\/[^;]+;base64,/, '') : null,
- audio_file_id: data.audio_paramter_type === 1 ? data.base64 : null,
- text: data.text,
- audio_paramter_type: data.audio_paramter_type,
- is_attach_audio_url_user: 'true',
- is_attach_audio_url_standard: data.standard
- }).then((res) => {
- if (!res ) {
- throw new Error((res && (res.error || res.message)) || '评分接口失败');
- }
- return res;
- });
- }
|