Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
translation-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinmingyuan
translation-server
Commits
98df30ec
Commit
98df30ec
authored
Jan 19, 2025
by
mingyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:限制tts 文本长度
parent
62bd095c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
textToSpeechReq.dto.ts
src/controller/translate/dto/req/textToSpeechReq.dto.ts
+8
-1
translateReq.dto.ts
src/controller/translate/dto/req/translateReq.dto.ts
+1
-2
No files found.
src/controller/translate/dto/req/textToSpeechReq.dto.ts
View file @
98df30ec
import
{
ApiProperty
}
from
'@nestjs/swagger'
;
import
{
Expose
}
from
'class-transformer'
;
import
{
IsNotEmpty
,
IsNumber
,
IsOptional
,
IsString
}
from
'class-validator'
;
import
{
IsNotEmpty
,
IsNumber
,
IsOptional
,
IsString
,
Length
,
}
from
'class-validator'
;
export
class
TextToSpeechReqDto
{
@
ApiProperty
({
...
...
@@ -11,6 +17,7 @@ export class TextToSpeechReqDto {
@
Expose
()
@
IsNotEmpty
()
@
IsString
()
@
Length
(
1
,
200
)
text
:
string
;
@
ApiProperty
({
...
...
src/controller/translate/dto/req/translateReq.dto.ts
View file @
98df30ec
import
{
SupportLanguages
}
from
'@/common/utils/constants'
;
import
{
ApiProperty
}
from
'@nestjs/swagger'
;
import
{
Expose
}
from
'class-transformer'
;
import
{
IsEnum
,
IsNotEmpty
,
IsString
,
Length
}
from
'class-validator'
;
import
{
IsEnum
,
IsNotEmpty
,
IsString
}
from
'class-validator'
;
export
class
TranslateReqDto
{
@
ApiProperty
({
...
...
@@ -32,6 +32,5 @@ export class TranslateReqDto {
@
Expose
()
@
IsNotEmpty
()
@
IsString
()
@
Length
(
1
,
200
)
text
:
string
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment