mrschyzo / tts-rest-wrapper Goto Github PK
View Code? Open in Web Editor NEWA REST wrapper for TTS systems. Generated with Quarkus' "scaffolding".
A REST wrapper for TTS systems. Generated with Quarkus' "scaffolding".
Start meddling here
An example for reference:
curl 'https://cache-a.oddcast.com/tts/gen.php?EID=2&LID=7&VID=7&TXT=a%20seguito%20di%20un%20cambio%20del%20YML%20della%20CI%20di%20Drone%2C%20potrebbe%20essere%20necessario%20un%20rebase%20dei%20branch%20ancora%20attivi%20se%20la%20CI%20vi%20schianta%20in%20questi%20branch&IS_UTF8=1&ACC=3314795&API=2292376&CB=vw_mc.vwCallback&HTTP_ERR=1&vwApiVersion=2&d=f88dda1b76a1b76931320d9f8810330ee9f6df88dd' \
-H 'authority: cache-a.oddcast.com' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36' \
-H 'sec-ch-ua-platform: "Linux"' \
-H 'accept: */*' \
-H 'sec-fetch-site: cross-site' \
-H 'sec-fetch-mode: no-cors' \
-H 'sec-fetch-dest: audio' \
-H 'referer: https://www.vocalware.com/' \
-H 'accept-language: en-US,en;q=0.9,it;q=0.8' \
-H 'range: bytes=0-' \
--compressed
See the quarkus guide and this.
After adding custom config converters, native Quarkus fails to start.
It looks like the compiled version of the Converter does not have an initializer in its code (see SmallRye Config).
Maybe Quarkus does not support converters?
I can always use:
@Producer
method and @Inject
ed into the StorageLazyCache
.2021-10-09 01:02:10,082 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): java.lang.NoSuchMethodError: it.mrschyzo.configuration.PositiveLongCoercionConverter.<init>()
at io.smallrye.config.ConfigMappingContext.lambda$getConverterInstance$7(ConfigMappingContext.java:185)
at java.util.Map.computeIfAbsent(Map.java:1003)
at io.smallrye.config.ConfigMappingContext.getConverterInstance(ConfigMappingContext.java:169)
at io.smallrye.config.ConfigMappingContext.getConverter(ConfigMappingContext.java:104)
at io.smallrye.config.ConfigMappingContext.lambda$getValueConverter$4(ConfigMappingContext.java:92)
at java.util.HashMap.computeIfAbsent(HashMap.java:1133)
at io.smallrye.config.ConfigMappingContext.getValueConverter(ConfigMappingContext.java:89)
at it.mrschyzo.configuration.StorageConfiguration1648742051Impl.<init>(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at io.smallrye.config.ConfigMappingLoader.configMappingObject(ConfigMappingLoader.java:59)
at io.smallrye.config.ConfigMappingContext.constructGroup(ConfigMappingContext.java:80)
at io.smallrye.config.ConfigMappingContext.constructRoot(ConfigMappingContext.java:76)
at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:811)
at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:794)
at io.smallrye.config.ConfigMappings.mapConfiguration(ConfigMappings.java:54)
at io.smallrye.config.ConfigMappings.registerConfigMappings(ConfigMappings.java:36)
at io.quarkus.arc.runtime.ConfigRecorder.registerConfigMappings(ConfigRecorder.java:81)
at io.quarkus.deployment.steps.ConfigBuildStep$registerConfigClasses-2116437784.deploy_0(ConfigBuildStep$registerConfigClasses-2116437784.zig:132)
at io.quarkus.deployment.steps.ConfigBuildStep$registerConfigClasses-2116437784.deploy(ConfigBuildStep$registerConfigClasses-2116437784.zig:40)
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:579)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:101)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
Improve log messages. I also need to study how to send/collect logs from stdout.
Add health probes.
Maybe this can be useful.
Maybe this can prove useful.
Reference: this line of code
Creating a new MessageDigest for every new call is utterly ugly. Create a generic object pool with configurable size in order to avoid useless allocations.
I use Result<O, E>
somewhere in the codebase, but without any coherence. It would be better if I use it extensively as it forces me to handle errors. The worst part is making it work with Uni<T>
without ruining the code readability.
Another thing: I do not map any exception to HTTP responses, only 500 errors, and it's ugly.
My project uses SmallRye OpenAPI that is based on MicroProfile OpenAPI. Here are some annotation examples.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.