austinv11 / PeripheralsPlusPlus

A pseudo-port of miscperipherals, with other stuff as well!
GNU General Public License v2.0
25 stars 27 forks source link

Trying to make the speaker speak #100

Closed plazia closed 8 years ago

plazia commented 9 years ago

I understand from what I read of the documentation that it uses the Google translate API.

Do I have to purchase a license from Google to use the API though because my speakers in Peripherals++ 1.3.1 are producing no speech.

I can put down a peripheral and do s = peripheral.wrap("left") the peripheral is on the left of the advanced computer then when I do s.speak("Hello there") nothing happens. I get an HTTP 503 error message in the ATLauncher console output though.

Is there a way of using alternative methods for text to speech? For example I have the wonderful IVONA TTS engines installed on my PC as speech providers.

I viewed the config file but couldn't see anywhere where I could select alternative methods.

Thanks in advance. Wonderful mod btw.

Also I'm not entirely sure what's causing it but my FPS drops significantly when adding only your mod. My overal performance seems to stutter. I could understand if it I had computers with lots of loops and what not going on but this is on a fresh world with no computers down. I simply add your mod to my modpack and I'm getting a serious negative impact on performance. Anyways I just thought I'd mention it to see if you or others have been experiencing similar things. Perhaps it's just me.

Peace.

austinv11 commented 9 years ago

So... it appears that google doesn't like me using their api. Consider the speak method deprecated. For now, use the synthesize method instead. It uses offline tts but it sounds a little crappier, more info here. As for your fps drops, I'm gonna need your system's specs.

austinv11 commented 9 years ago

I was able to whip up a quick fix, it uses a different web api and supports fewer languages, but I'll release it with that api for the time being while I work out a more long term solution.

plazia commented 9 years ago

I've narrowed it down. With your mod running my CPU temperatures are skyrocketing to around 80 - 90 C. Normally playing Minecraft they are around 60 - 67 C. Removing your mod seems to alleviate the problem. Something in your mod is placing an awful strain on the CPU it seems. Another user in the #rr3 channel on irc.esper.net (our Resonant Rise 3 modpack channel on IRC) also confirmed he noticed a perceptibly lower frame-rate.

My specifications are as follows

java -version java version "1.8.0_51"

Windows 7 Ultimate 64-bit SP1 Intel Core i5 3570K @ 4.4 GHz (Turbo) 16 GiB DDR3 GeForce GTX 660 Ti

Peripherals++-1.3.1 CollectiveFramework-1.0.0-121

It is pleasing to see you have found a fix for the speech API problem. I look forward to trying a new release when you get around to it.

austinv11 commented 9 years ago

Do you mind testing with just Collective Framework enabled?

plazia commented 9 years ago

Sorry for the late reply. Yesterday evening I tested with just Collective Framework installed on both client and server and it seemed to run fine (absent Peripherals++)

The minute I add Peripherals++ is when my CPU temp rockets up and frame-rates dive. Yesterday evening I tested with just Collective Framework installed on both client and server and it seemed to run fine (absent Peripherals++)

The minute I add Peripherals++ is when my CPU temp rockets up and frame-rates dive.

austinv11 commented 9 years ago

I was testing Peripherals++ and CollectiveFramework with a java profiler and I could find nothing out of the ordinary. Although you should know that forge isn't the most stable with java 1.8

plazia commented 9 years ago

Do you recommend reverting to and continuing testing with Java 1.7?

austinv11 commented 9 years ago

Java 8 should be alright, but lexmanos targets forge for specific compatibility with java 7. Really, I just have no idea why my mod is causing issues, so it may just be java.

geogeo3 commented 9 years ago

updating to the marytts may not work for some because they can't access the website

austinv11 commented 9 years ago

It was never meant to be a permanent solution. I only did that to prevent everyone's builds from instantly breaking. Please use synthesize () until I redo the speak () function. On Aug 9, 2015 3:11 PM, "geogeo3" notifications@github.com wrote:

updating to the marytts may not work for some because they can't access the website

— Reply to this email directly or view it on GitHub https://github.com/austinv11/PeripheralsPlusPlus/issues/100#issuecomment-129226873 .

geogeo3 commented 9 years ago

But literally no one uses the synthesize function so most things so there is no point in changing it. Lots of things will be broken still. This will be frustrating for many players.

darichey commented 9 years ago

The changed happened almost a month ago and no one has said anything about it breaking things.

Selim042 commented 9 years ago

If it is that big of an issue, you should be able to add '''speaker.speak = speaker.synthesize''' to your startup and it would work again.