ow
This commit is contained in:
1 parent
fd48c2eb7d
commit
cb3fdca3e1
8 files changed
+339
-52
No files matched your search
@@ -202,12 +202,12 @@ this.aiBookService= aiBookService;
|
||||
|
||||
[PermissionOperate(name: "AiBook", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic GetTtsStream(string text)
|
||||
public dynamic GetMp3Stream(AiSentenceViewEntity aiSentence)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = aiBookService.GetTtsStream(text);
|
||||
var result = aiBookService.GetMp3Stream(aiSentence);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
@@ -220,6 +220,82 @@ this.aiBookService= aiBookService;
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "AiBook", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic GenerateMp3(AiChapterEntity[] chapters){
|
||||
try
|
||||
{
|
||||
aiBookService.GenerateMp3(chapters);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "AiBook", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic GenerateMp3ByBookId(string bookId){
|
||||
try
|
||||
{
|
||||
aiBookService.GenerateMp3ByBookId(bookId);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "AiBook", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic PackPersonNameByBookId(string bookId){
|
||||
try
|
||||
{
|
||||
aiBookService.PackPersonNameByBookId(bookId);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "AiBook", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic PackPersonName(AiChapterEntity[] chapters){
|
||||
try
|
||||
{
|
||||
aiBookService.PackPersonName(chapters);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user