“An error occurred while creating the WebJob schedule”

Azure WebJob has been very helpful to help me running small automated tasks without the hassle of creating VMs or worker roles. Moreover, if you are using a recent version of Visual Studio (from Update 3, I think), you will also get some tooling support for publishing WebJob to Azure Website directly from inside the IDE. It is much more convenient than the old way: building, zipping, going to the portal, deleting the old build and uploading the new one.

However, I then got a strange problem while publishing the WebJob of one project. The error message simply said: “an error occurred while creating the WebJob schedule,” which is not useful for finding a solution at all. I have tried to search around the Internet for a solution, but cannot find any. Even stranger, I can publish that project normally to my staging websites, but not to the production one.

Eventually I found out that I have not set up any deployment credentials for my production Azure Website, and setting one solve the problem completely. I guess the tooling need that credentials to upload the WebJob’s binaries to the website.

I cost me days and days, and I found the solution accidentally after I had tried to connect to the Website using FTP, which requires deployment credentials. I hope this blog post will save you sometime should you got the same problem. I also hope that the tooling will show better error messages next time.

Penny Pinching on Microsoft Azure (updated)

Cloud Computing is becoming a very interesting platform for Startups and small development teams who usually do not have much capital to invest in infrastructure and management. Cloud Computing is usually considered a cheap, quick and easy way to spin up (and down) resources such as websites or virtual machines. However, you may still be spending a lot more than necessary should you not try to make your system “Cloud efficient”.

There has been many articles on the Internet on saving money on the Cloud. As Cloud resources are usually billed by usage, trying to optimize your app can save you a lot of money. If you are using Microsoft Azure, I recommend reading some blog posts from Scott Hanselman on the “Penny pinching” topic:

http://www.hanselman.com/blog/PinchingPenniesWhenScalingInTheCloud.aspx
http://www.hanselman.com/blog/PennyPinchingVideoMovingAnAzureWebsiteBetweenDataCenters.aspx
http://www.hanselman.com/blog/PennyPinchingVideoMovingMyWebsitesImagesToTheAzureCDNAndUsingACustomDomain.aspx
http://www.hanselman.com/blog/PennyPinchingInTheCloudHowToRunATwoDayVirtualConferenceFor10.aspx
http://www.hanselman.com/blog/PennyPinchingInTheCloudEnablingNewRelicPerformanceMonitoringOnWindowsAzureWebsites.aspx

In this blog post I will also share some of my experience with saving money on Microsoft Azure through out my team’s projects. And please let me know in the comments if you have even better ways to save money on the Cloud!

Read More

A better way to create the full-context labels for HTS training data

One of my previous post describes my first attempt to generate training data for HTS system from recordings and transcripts: How to create full-context labels for your HTS system (update: not really worked); unfortunately, it did not work as expected. During eNTERFACE’14, I have learned that there is a tool named EHMM in festvox that can help to build the .utt files (and in turn the full-context labels easily).

To start, you can follow the steps in the following link, which is the full instruction to build a CLUSTERGEN voice: http://festvox.org/bsv/c3170.html.

You can actually stop after having obtained the .utt files and use it for your own purposes.

In general, the necessary steps are listed below:

Read More

ZureTTS from the eNTERFACE’14 workshop

Last month (from June 9 to July 4), I have a chance to go to Spain to work on a project name ZureTTS (which means Your Text-to-speech in Basque language) during the eNTERFACE’14 workshop. This was very excited considering the unique opportunity to work with graduate students and researchers in speech processing all around Europe in 4 full working weeks (and the opportunity to leave in Spain for 1 month as well).

Basically ZureTTS is an online platform for anyone to obtain a speech synthesis engine with their own voice. The technology was not new, but this was the effort to coordinate multiple modules and technologies to create a complete and assessable system. Users can go to the website, register for an account, then record there voice with 100 pre-defined sentences in a chosen language, and choose to start the adaptation process. The adaption from the average/generic voice to the personalized voice is queued up and run sequentially in the background on the main server, which may last from 1 hours to 10 hours. After the adaption has finished, an notification email will be sent, and users can go back to the website to synthesize speech using there own voice. There is also a web API for synthesizing so that mobile apps can plug in to this in the future.

I am very happy that we can complete a working system described above in only 4 weeks. Of course, there are still many possible improvements, but the basic flow of the system is complete, and the system is also quite decoupled and extensible. You can try it out at http://aholab.ehu.es/zuretts (the server sometimes blocks you for 20 to 30 minutes, I am still not sure why).

And below is a photo of the awesome team and awesome new friends.

From left to right: Haritz Arzelus, Rubén Pérez Ramón, Carmen Magariños, Igor Jauk, Agustín Alonso, Daniel Erro (the first project leader), Jianpei Ye, Xin Wang, Martin Sulír, me and Xiaohai Tian
From left to right: Haritz Arzelus, Rubén Pérez Ramón, Carmen Magariños, Igor Jauk, Agustín Alonso, Daniel Erro (the first project leader), Jianpei Ye, Xin Wang, Martin Sulír, me and Xiaohai Tian

And below is a photo of Prof. Inma Hernaez, our 2nd project leader and the photographer of the photo above, and me.

Inma and me
Prof. Inma Hernáez and me

How to access current logged in user information outside of Drupal

If you are writing PHP code in Drupal and would like to access basic user information (e.g. UID, username), you can simply define the global variable $user and get the data from there:

However, it would be more complicated when you want to access the same information outside of Drupal system (but still in the same domain). For instance, you want to implement a PHP page to provide data to your JavaScript (AJAX or Web API style), and you want to have access to the current Drupal user directly inside your PHP code instead of passing the UID around (which is quite insecure in my opinion).

My problem is briefly demonstrated in the diagram below:

Access Drupal user from the outside

Read More