-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTS API improvements #2308
Merged
Merged
TTS API improvements #2308
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5715446
update doc on COQUI_LANGUAGE env variable
blob42 9dd27ab
return errors from tts gRPC backend
blob42 ec4a847
handle speaker_id and language in coqui TTS backend
blob42 e7191bc
TTS endpoint: add optional language paramter
blob42 b1719e6
tts fix: empty language string breaks non-multilingual models
blob42 5e8d7c7
allow tts param definition in config file
blob42 d2a01ea
tts: update doc
blob42 5ee80e3
Merge branch 'master' into tts_api
mudler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,61 @@ | ||
package schema | ||
|
||
import ( | ||
gopsutil "github.com/shirou/gopsutil/v3/process" | ||
) | ||
|
||
type BackendMonitorRequest struct { | ||
Model string `json:"model" yaml:"model"` | ||
} | ||
|
||
type BackendMonitorResponse struct { | ||
MemoryInfo *gopsutil.MemoryInfoStat | ||
MemoryPercent float32 | ||
CPUPercent float64 | ||
} | ||
|
||
type TTSRequest struct { | ||
Model string `json:"model" yaml:"model"` | ||
Input string `json:"input" yaml:"input"` | ||
Voice string `json:"voice" yaml:"voice"` | ||
Backend string `json:"backend" yaml:"backend"` | ||
} | ||
|
||
type StoresSet struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
Values []string `json:"values" yaml:"values"` | ||
} | ||
|
||
type StoresDelete struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Keys [][]float32 `json:"keys"` | ||
} | ||
|
||
type StoresGet struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
} | ||
|
||
type StoresGetResponse struct { | ||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
Values []string `json:"values" yaml:"values"` | ||
} | ||
|
||
type StoresFind struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Key []float32 `json:"key" yaml:"key"` | ||
Topk int `json:"topk" yaml:"topk"` | ||
} | ||
|
||
type StoresFindResponse struct { | ||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
Values []string `json:"values" yaml:"values"` | ||
Similarities []float32 `json:"similarities" yaml:"similarities"` | ||
} | ||
package schema | ||
|
||
import ( | ||
gopsutil "github.com/shirou/gopsutil/v3/process" | ||
) | ||
|
||
type BackendMonitorRequest struct { | ||
Model string `json:"model" yaml:"model"` | ||
} | ||
|
||
type BackendMonitorResponse struct { | ||
MemoryInfo *gopsutil.MemoryInfoStat | ||
MemoryPercent float32 | ||
CPUPercent float64 | ||
} | ||
|
||
// @Description TTS request body | ||
type TTSRequest struct { | ||
Model string `json:"model" yaml:"model"` // model name or full path | ||
Input string `json:"input" yaml:"input"` // text input | ||
Voice string `json:"voice" yaml:"voice"` // voice audio file or speaker id | ||
Backend string `json:"backend" yaml:"backend"` | ||
Language string `json:"language,omitempty" yaml:"language,omitempty"` // (optional) language to use with TTS model | ||
} | ||
|
||
type StoresSet struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
Values []string `json:"values" yaml:"values"` | ||
} | ||
|
||
type StoresDelete struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Keys [][]float32 `json:"keys"` | ||
} | ||
|
||
type StoresGet struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
} | ||
|
||
type StoresGetResponse struct { | ||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
Values []string `json:"values" yaml:"values"` | ||
} | ||
|
||
type StoresFind struct { | ||
Store string `json:"store,omitempty" yaml:"store,omitempty"` | ||
|
||
Key []float32 `json:"key" yaml:"key"` | ||
Topk int `json:"topk" yaml:"topk"` | ||
} | ||
|
||
type StoresFindResponse struct { | ||
Keys [][]float32 `json:"keys" yaml:"keys"` | ||
Values []string `json:"values" yaml:"values"` | ||
Similarities []float32 `json:"similarities" yaml:"similarities"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not setup git to ignore the end of line space, I am using unix end of line style.