修复 vad目录异常问题 silero_vad.onnx
This commit is contained in:
parent
8e0cc81283
commit
3e936e71f6
|
|
@ -51,7 +51,7 @@ namespace Learn.VideoAnalysis.Components.Pages
|
|||
NotificationType = NotificationType.Warning
|
||||
});
|
||||
}
|
||||
if (InputAccount == "admin" && InputPassword == "q1w2e3!@#")
|
||||
if (InputAccount ==AppCommon.Config.Admin.Account && InputPassword == AppCommon.Config.Admin.Password)
|
||||
{
|
||||
await session.SetAsync("Login", true);
|
||||
NavigationManager.NavigateTo("/");
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ namespace Learn.VideoAnalysis.Controllers.Dto
|
|||
public TextValue(float v)
|
||||
{
|
||||
var s = TimeSpan.FromSeconds((double)v);
|
||||
Text = s.ToString(@"mm\:ss");
|
||||
var td = new[] { s.Hours, s.Minutes, s.Seconds };
|
||||
Text = string.Join(':', td.Where(s => s > 0));
|
||||
Value = v;
|
||||
}
|
||||
public TextValue(string t,object v)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,11 @@
|
|||
},
|
||||
"AllowedHosts": "*",
|
||||
"AppConfig": {
|
||||
"ID": "APP0001",//程序唯一值
|
||||
"ID": "APP0001", //程序唯一值
|
||||
"Admin": {
|
||||
"Account": "admin",
|
||||
"Password": "q1w2e3!@#"
|
||||
},
|
||||
"Redis": {
|
||||
"ConnectionString": "127.0.0.1:6379,password=Woshiren123,defaultDatabase=10"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace VideoAnalysisCore.AICore.SherpaOnnx
|
|||
OR = new OfflineRecognizer(config);
|
||||
|
||||
VADModelConfig = new VadModelConfig();
|
||||
VADModelConfig.SileroVad.Model = Path.Combine(AppCommon.AIModelFile, "sherpa-onnx-sense-voice-24-07-17", "silero_VAD.onnx");
|
||||
VADModelConfig.SileroVad.Model = Path.Combine(AppCommon.AIModelFile, "sherpa-onnx-sense-voice-24-07-17", "silero_vad.onnx");
|
||||
VADModelConfig.Debug = 0;
|
||||
//缓冲区大小
|
||||
VAD = new VoiceActivityDetector(VADModelConfig, 60);
|
||||
|
|
|
|||
|
|
@ -272,6 +272,20 @@ namespace VideoAnalysisCore.Common
|
|||
|
||||
}
|
||||
/// <summary>
|
||||
/// 管理界面Admin账号
|
||||
/// </summary>
|
||||
public class AdminConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 账号
|
||||
/// </summary>
|
||||
public string Account { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
/// <summary>
|
||||
/// redis配置
|
||||
/// </summary>
|
||||
public class RedisConfig
|
||||
|
|
@ -308,6 +322,10 @@ namespace VideoAnalysisCore.Common
|
|||
/// </summary>
|
||||
public string ID { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// Admin
|
||||
/// </summary>
|
||||
public AdminConfig Admin { get; set; } = new AdminConfig();
|
||||
/// <summary>
|
||||
/// redis
|
||||
/// </summary>
|
||||
public RedisConfig Redis { get; set; } = new RedisConfig();
|
||||
|
|
|
|||
Loading…
Reference in New Issue