Lyo.Tts.Typecast
1.0.9
dotnet add package Lyo.Tts.Typecast --version 1.0.9
NuGet\Install-Package Lyo.Tts.Typecast -Version 1.0.9
<PackageReference Include="Lyo.Tts.Typecast" Version="1.0.9" />
<PackageVersion Include="Lyo.Tts.Typecast" Version="1.0.9" />
<PackageReference Include="Lyo.Tts.Typecast" />
paket add Lyo.Tts.Typecast --version 1.0.9
#r "nuget: Lyo.Tts.Typecast, 1.0.9"
#:package Lyo.Tts.Typecast@1.0.9
#addin nuget:?package=Lyo.Tts.Typecast&version=1.0.9
#tool nuget:?package=Lyo.Tts.Typecast&version=1.0.9
Lyo.Tts.Typecast
Typecast TTS via Lyo.Typecast.Client. TypecastTtsService synthesizes audio through TypecastClient, can load the voice catalog for validation (LoadVoicesAsync), and uses the bulk pipeline and Typecast-namespaced metrics from Lyo.Tts.
Target frameworks: netstandard2.0, net10.0
Examples
Register with DI
using Lyo.Tts.Typecast;
using Lyo.Typecast.Client;
services.AddTypecastClientFromConfiguration(configuration);
services.AddTypecastTtsServiceFromConfiguration(configuration);
// Or with an inline configurator:
// services.AddTypecastTtsService(opts => { opts.DefaultVoiceId = "..."; });
Prerequisites
- Configure API access with
AddTypecastClientFromConfiguration(sectionTypecastClientby default). - Add TTS options and the service (
TypecastOptionssection defaults toTypecastOptions).
Dependency injection
Both AddTypecastTtsService and AddTypecastTtsServiceFromConfiguration register:
TypecastTtsService(singleton; subclass ofTtsServiceBase<TypecastTtsRequest>).ITtsService<TypecastTtsRequest>resolved from the singleton above.TypecastTtsAppServiceconvertsTtsResult<TypecastTtsRequest>intoTtsSynthesisResult.ITtsService(non-generic) backed byTypecastTtsAppService, so consumers that only depend on the simple contract can resolve it directly.
DefaultVoiceId, DefaultModel, MaxTextLength, and bulk limits come from TypecastOptions (which
inherits shared fields from TtsServiceOptions). TypecastTtsService
requires a registered TypecastClient. Register it first via AddTypecastClientFromConfiguration or
AddTypecastClient from Lyo.Typecast.Client.
Voices and validation
Call await typecastService.LoadVoicesAsync() during startup so SynthesizeAsync can verify (model, voiceId) pairs against the downloaded catalog; if voices are not loaded, validation is skipped (see logging in TypecastTtsService).
Builder overload caveat
There is an overload named SynthesizeToFileAsync(TypecastTtsRequestBuilder, …) on TypecastTtsService that does not write to disk. It only builds a request and returns audio bytes. Use the base class SynthesizeToFileAsync(TypecastTtsRequest, string, …) with builder.Build() when you need a file.
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Exceptions(direct, lyo)Lyo.Tts(direct, lyo)Lyo.Typecast.Client(direct, lyo)Microsoft.Extensions.Configuration.Binder10.0.5(direct, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5(direct, microsoft)Microsoft.Extensions.Options10.0.5(direct, microsoft)System.Text.Json10.0.5(direct, microsoft, netstandard2.0)Lyo.Api.Client(transitive, lyo)Lyo.Api.Models(transitive, lyo)Lyo.Common(transitive, lyo)Lyo.DateAndTime(transitive, lyo)Lyo.Diagnostic(transitive, lyo)Lyo.Hashing(transitive, lyo)Lyo.Metrics(transitive, lyo)Lyo.PackageMetadata(transitive, lyo)Lyo.Query.Models(transitive, lyo)Lyo.Result(transitive, lyo)Lyo.Tts.Models(transitive, lyo)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5(transitive, microsoft)Microsoft.Extensions.Http10.0.5(transitive, microsoft)Microsoft.Extensions.Options.ConfigurationExtensions10.0.5(transitive, microsoft)System.IO.Hashing10.0.5(transitive, microsoft, net10.0)System.Memory4.6.3(transitive, microsoft, netstandard2.0)System.Threading.Tasks.Extensions4.6.3(transitive, microsoft)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Exceptions (>= 1.0.9)
- Lyo.Tts (>= 1.0.9)
- Lyo.Typecast.Client (>= 1.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Options (>= 10.0.5)
- System.Text.Json (>= 10.0.5)
-
net10.0
- Lyo.Exceptions (>= 1.0.9)
- Lyo.Tts (>= 1.0.9)
- Lyo.Typecast.Client (>= 1.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Options (>= 10.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Lyo.Tts.Typecast:
| Package | Downloads |
|---|---|
|
Lyo.Tts.Typecast.Web.Components
Reusable Blazor components for Typecast text to speech experiences. |
GitHub repositories
This package is not used by any popular GitHub repositories.