mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-21 22:53:56 +08:00
fix:修复复刻失败的问题
This commit is contained in:
-3
@@ -257,14 +257,11 @@ public class VoiceCloneServiceImpl extends BaseServiceImpl<VoiceCloneDao, VoiceC
|
|||||||
if (type.equals("huoshan_double_stream")) {
|
if (type.equals("huoshan_double_stream")) {
|
||||||
huoshanClone(config, entity);
|
huoshanClone(config, entity);
|
||||||
}
|
}
|
||||||
} catch (RenException re) {
|
|
||||||
throw re;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
entity.setTrainStatus(3);
|
entity.setTrainStatus(3);
|
||||||
entity.setTrainError(e.getMessage());
|
entity.setTrainError(e.getMessage());
|
||||||
baseDao.updateById(entity);
|
baseDao.updateById(entity);
|
||||||
throw new RenException(ErrorCode.VOICE_CLONE_TRAINING_FAILED, e.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -276,25 +276,22 @@ export default {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('处理响应时出错:', error);
|
console.error('处理响应时出错:', error);
|
||||||
// 出错时更新状态为训练失败
|
|
||||||
this.updateRowStatus(row, 3);
|
|
||||||
this.$message.error('处理响应时出错');
|
this.$message.error('处理响应时出错');
|
||||||
} finally {
|
} finally {
|
||||||
row._submitting = false;
|
row._submitting = false;
|
||||||
|
this.fetchVoiceCloneList();
|
||||||
}
|
}
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.error('API调用失败:', error);
|
console.error('API调用失败:', error);
|
||||||
// 请求失败时更新状态为训练失败
|
|
||||||
this.updateRowStatus(row, 3);
|
|
||||||
this.$message.error('请求失败');
|
this.$message.error('请求失败');
|
||||||
row._submitting = false;
|
row._submitting = false;
|
||||||
|
this.fetchVoiceCloneList();
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('调用API时出错:', error);
|
console.error('调用API时出错:', error);
|
||||||
// 出错时更新状态为训练失败
|
|
||||||
this.updateRowStatus(row, 3);
|
|
||||||
this.$message.error('调用API时出错');
|
this.$message.error('调用API时出错');
|
||||||
row._submitting = false;
|
row._submitting = false;
|
||||||
|
this.fetchVoiceCloneList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user