VoxCommando

Help and Support (Using VoxCommando) => Other Plugins => Topic started by: jitterjames on February 22, 2012, 06:38:50 PM

Title: Bing plugin for translation and TTS in many languages
Post by: jitterjames on February 22, 2012, 06:38:50 PM
Here's the very first beta of the new Bing plugin.  You can use it to translate between many different languages, and also to read TTS (text to speech) out loud in many languages without having to purchase an expensive TTS engine for each language!

Support for this plugin will last for as long as Bing offers their free API.  You need to create your own API key (free) which will allow you to do many translation per day.  If you need to do more then you need to purchase a key from Microsoft.

Get your key by going to https://ssl.bing.com/webmaster/developers/appids.aspx and following the directions.  You will need a windows live ID to sign in.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on April 12, 2012, 01:31:50 PM
As expected Bing will be cancelling their free API, just as Google did.

These companies are driving me crazy!  It is hopeless.  ::yuck
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on April 12, 2012, 01:33:21 PM
Quote
Dear Bing API Developer:

For the past several years, the Bing Search API has made search data available for developers to innovate and build upon. Today we are announcing that the Bing Search API will transition to an offering made available on the Windows Azure Marketplace. The Windows Azure Marketplace is a one stop shop for cloud data, apps, and services, including the Microsoft Translator API. Through this platform, developers can access hundreds of data sets and APIs and distribute their applications through the marketplace.

A few important things to note regarding the upcoming transition:
With the transition, Bing Search API developers will have access to fresher results, improved relevancy, and more opportunities to monetize their usage of the Search API. To offer these services at scale, we plan to move to a monthly subscription model. Developers can expect subscription pricing to start at approximately $40 (USD) per month for up to 20,000 queries each month.
The transition will begin in several weeks and will take a few months to complete. Developers will be encouraged to try the Bing Search API for free on the Windows Azure Marketplace during the transition period, before we begin charging for the service.
At this time, you can continue using Bing Search API 2.0 free of charge. After the transition period, Bing Search API 2.0 will no longer be available for free public use.
Details regarding the transition timeline, pricing structure, and other changes will be announced in upcoming weeks. In the meantime, we encourage you to explore the Windows Azure Marketplace and read the documentation. As a Bing Search API developer, you can expect the transition to involve targeting a new API end point, moderate changes to the request and response schemas, and a new security requirement to authenticate your application key. Developers using approximately 3 to 4 million queries and above can expect to transition through a separate process (details will be provided shortly).
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Kalle on April 12, 2012, 03:10:25 PM

We user make the company's big, and then kick us in ass  ::yuck
What come up next? Paying for a search result?

Kalle
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on April 12, 2012, 04:51:19 PM
we already pay for this by giving up our privacy.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: vulcanjedi on August 23, 2012, 09:45:10 PM
the more i read from you guys.....the more i like you, u guys crack me up :biglaugh
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on August 23, 2012, 11:37:51 PM
the more i read from you guys.....the more i like you, u guys crack me up :biglaugh

I'm glad our suffering amuses you.  ;)
Title: Re: Bing plugin for translation and TTS in many languages
Post by: vulcanjedi on August 24, 2012, 01:34:35 AM
Well I'm on the Apple support forums by the crippling battery life after the recent OS X upgrade and no one there seems to be amused by me if that gives you any comfort :)
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on August 28, 2012, 09:56:46 AM
Google does it again!  They have now closed down their weather api so our weather plugin is broken now too! >:( >:( >:(
Title: Re: Bing plugin for translation and TTS in many languages
Post by: xtermin8r on August 28, 2012, 04:47:01 PM
Quote
We user make the company's big, and then kick us in ass  yuck
What come up next? Paying for a search result?

Ha ha ha, brilliant stuff Kalle.  :clap  :biglaugh
Title: Re: Bing plugin for translation and TTS in many languages
Post by: vulcanjedi on August 28, 2012, 08:39:44 PM
i just realized I'm kinda pissed by this now, as I was thinking being able to use a FOREIGN speech commands is brilliant and would in theory perhaps reduce errant pick ups from watching regular english! Ugh, find another free API!
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Phobophile on March 10, 2014, 03:50:37 PM
Hi, James!

If you're still interested in having a translation plugin, I can suggest you this service (http://api.yandex.com/translate/).
First of all, it gives you 10000 requests a day for a single API key. And second, Yandex company is not known for monetizing their products by totally blocking free access, unlike those "corporations of good and justice", which were mentioned before (after all, it was made in the country of communists ;)). So, it's pretty unlikely that this service will be broken soon.
No TTS in this API though, just text.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on March 10, 2014, 04:25:10 PM
Wow.  What a great find.  Assuming this offers decent quality translation it will come in very handy.

It looks like we will be able to make full use of the api using the scrape action.  I will look into it as soon as I have time and will post back with some sample XML if I have success with it.

Thanks for the info!  :clap
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on March 10, 2014, 04:30:27 PM
By the way I just tested it and the Bing plugin still works great, but I don't know if you can still get an api key for it or not.  I am reluctant to share my key with the general public since it would probably get maxed out pretty quickly and then be revoked.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Phobophile on March 12, 2014, 12:27:56 PM
Ok, I've tried it and it works ok. Also, nime5ter posted his XML here (http://voxcommando.com/forum/index.php?topic=1444).

By the way, I've stumbled upon some encoding-related bug in the XJSON plugin. When calling method GUI.ShowNotification with some silly characters in its params (cyrillic letters in my case), XBMC gets ?-symbols instead and shows them accordingly.
Although this RPC call works ok in the browser and in the scrape plugin:
Code: [Select]
http://127.0.0.1:8080/jsonrpc?request={"jsonrpc":"2.0","id":1,"method":"GUI.ShowNotification","params":{"title":"Test","message":"Тест"}}So I'm using scrape and direct RPC call as a workaround to display translated text in XBMC.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on March 12, 2014, 12:45:24 PM
Text encoding is always a nightmare.  Funny, when I test your url using a web browser or scrape, I get 4 unreadable characters (boxes with an X in them).
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on March 12, 2014, 01:05:21 PM
Maybe that is because I don't have the correct location/font settings in XBMC though?
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Phobophile on March 14, 2014, 02:39:51 AM
Maybe that is because I don't have the correct location/font settings in XBMC though?
Yeah, that can be because of the skin's fonts (more likely) or regional settings. Anyway, I don't think this bug is too important for now, since this situation is pretty rare and there's a workaround.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on March 14, 2014, 11:08:39 AM
Thanks.  This is actually a bug that I had tried to address some time ago.  Upon revisiting some of my code I found something that I thought I had changed looking suspiciously old...

I can't test this with Cyrillic but I was able to test with french accents and I think I may have fixed it.  Can you please try replacing your xJson dll with the attached and let me know if it works for you.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Phobophile on March 17, 2014, 03:42:55 PM
Ok, I'll try it!
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Phobophile on March 19, 2014, 08:32:57 AM
Works like a charm, thanks!
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Hiryu on August 16, 2014, 03:19:16 PM
I'm trying to get the Bing translation to work.  Installed the plugin, and input my API key.

When I tell it to translate "apple" to a language (tried French and Chinese), it gives me a Bing.Translate:apple&&en&&zh-cn (apple&&en&fr) error: error for plugin c:\VoxCommando\Plugins\Ving\bing.dll

I had this weird XJSON error, but then I swapped the xjson.dll for the one posted on this thread into Plugins/xjson -- and it doesn't seem to have that error in the log anymore.  Now the log shows something different.


Attaching what I think is the relevant part of the log.

Running VC 2.0.0.5 for this, nonSP, since it requires dictation. 

Thanks if anyone can help.



Title: Re: Bing plugin for translation and TTS in many languages
Post by: Haddood on August 16, 2014, 03:40:53 PM
try testing with voxtell it seems VC generating alternates ... so it might not be executing the command
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on August 16, 2014, 04:06:12 PM
@Hadood: According to the log it is executing the command.

Hiryu, maybe you should send me your api key (privately) so I can test it.

I thought maybe Bing had stopped working, but I just tested it here and it works fine in French and also in Chinese.

I'm not sure why the translate to French would not work for you, but in the Chinese command you made you are not using a valid language code.  The valid codes are listed on the plugin settings window under the API Key.  Translation language codes are on the left. Valid translation languages are zh-CHS or zh-CHT

The list of codes on the right are for Bing.Speak (TTS) only, not translation.

By the way Bing translates the English word "apple" into French as "Apple" for some reason (assuming the company name I guess), unless you use it in a sentence.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on August 16, 2014, 04:13:09 PM
I had this weird XJSON error, but then I swapped the xjson.dll for the one posted on this thread into Plugins/xjson -- and it doesn't seem to have that error in the log anymore.  Now the log shows something different.

That dll was posted in March and is most likely older than the one shipping in version 2.0.0.5.

Please don't install older versions of plugin dll files without good reason and without knowing what you are doing.  This could very easily lead to impossible to solve problems later on down the road.

If I post a dll on the forum to solve a specific issue, you can assume that this version or a newer one will ship with the next version of the complete program.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Hiryu on August 16, 2014, 04:25:41 PM
Ok -- thanks.  well, I changed the original dll from the installation to .bak so I'll just delete the one from March and restore back to the original dll from the installation.  Thanks -- I thought it was worth a shot, since I saw an xjson error and was trying out different things to get it to work and not bothering you guys with yet another question.  I also sent you a message with my API key.  Thanks Jitterjames!
Title: Re: Bing plugin for translation and TTS in many languages
Post by: jitterjames on August 16, 2014, 04:33:30 PM
Your api key does not seem to work.  I don't know if that is because you got the wrong kind of key, or if it is because Microsoft is no longer issuing this type of key and mine is only working as a "legacy" key.

I believe Microsoft said a long time ago that this api was deprecated and I was surprised that it continued to work for so long.  Perhaps they are just not giving out any new keys that work with it.  Unfortunately I can't make my key public or it would get "used up".  Also, I think this would technically  violate my agreement with MS.
Title: Re: Bing plugin for translation and TTS in many languages
Post by: Hiryu on August 16, 2014, 04:36:33 PM
Thanks for looking, JitterJames -- I will try going the Yandex route, then -- hopefully that'll work.