mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
feat: expand speech provider support with new client types and config… (#389)
* feat: expand speech provider support with new client types and configuration schema * feat: add icon support for speech providers and update related configurations * feat: add SVG support for Deepgram and Elevenlabs with Vue components * feat: except *-speech client type in llm provider * feat: enhance speech provider functionality with advanced settings and model import capabilities * chore: remove go.mod replace * feat: enhance speech provider functionality with advanced settings and model import capabilities * chore: update go module dependencies --------- Co-authored-by: Acbox <acbox0328@gmail.com>
This commit is contained in:
+13
-5
@@ -88,7 +88,6 @@ import (
|
||||
"github.com/memohai/memoh/internal/storage/providers/fallback"
|
||||
"github.com/memohai/memoh/internal/storage/providers/localfs"
|
||||
ttspkg "github.com/memohai/memoh/internal/tts"
|
||||
ttsedge "github.com/memohai/memoh/internal/tts/adapter/edge"
|
||||
"github.com/memohai/memoh/internal/version"
|
||||
"github.com/memohai/memoh/internal/workspace"
|
||||
)
|
||||
@@ -520,10 +519,8 @@ func provideWebHandler(channelManager *channel.Manager, channelStore *channel.St
|
||||
return h
|
||||
}
|
||||
|
||||
func provideTtsRegistry(log *slog.Logger) *ttspkg.Registry {
|
||||
reg := ttspkg.NewRegistry()
|
||||
reg.Register(ttsedge.NewEdgeAdapter(log))
|
||||
return reg
|
||||
func provideTtsRegistry() *ttspkg.Registry {
|
||||
return ttspkg.NewRegistry()
|
||||
}
|
||||
|
||||
func provideTtsTempStore() (*ttspkg.TempStore, error) {
|
||||
@@ -687,6 +684,17 @@ func startRegistrySync(lc fx.Lifecycle, log *slog.Logger, cfg config.Config, que
|
||||
})
|
||||
}
|
||||
|
||||
func startSpeechProviderBootstrap(lc fx.Lifecycle, log *slog.Logger, queries *dbsqlc.Queries, registry *ttspkg.Registry) {
|
||||
lc.Append(fx.Hook{
|
||||
OnStart: func(ctx context.Context) error {
|
||||
if err := ttspkg.SyncRegistry(ctx, log, queries, registry); err != nil {
|
||||
log.Warn("speech registry bootstrap failed", slog.Any("error", err))
|
||||
}
|
||||
return nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func startMemoryProviderBootstrap(lc fx.Lifecycle, log *slog.Logger, mpService *memprovider.Service, registry *memprovider.Registry) {
|
||||
mpService.SetRegistry(registry)
|
||||
lc.Append(fx.Hook{
|
||||
|
||||
@@ -141,6 +141,7 @@ func options() fx.Option {
|
||||
fx.Invoke(
|
||||
injectToolProviders,
|
||||
startRegistrySync,
|
||||
startSpeechProviderBootstrap,
|
||||
startMemoryProviderBootstrap,
|
||||
startSearchProviderBootstrap,
|
||||
startScheduleService,
|
||||
|
||||
Reference in New Issue
Block a user