I tried mushrooms Pepper x IBM Bluemix Text to Speech

Create an audio file and let Pepper talk (play)

What is text-to-speech?

It converts text written using IBM's speech synthesis function into natural speech. Same as Polly in AWS.

Struggling with Pepper's utterance

It's hard to get Pepper to speak nicely. Moreover, it is more difficult to adjust the pronunciation because it cannot be done without the actual machine. I wish I could check it with a virtual robot, but that's not the case. .. What are you guys doing with this? ?? Are they all struggling? ??

Play text as audio file

So, convert the text to an audio file using Text to Speech and download it. I tried to make it speak as it is.

Create Text to Speech with Bluemix

スクリーンショット 2017-05-06 18.24.42.png

If you press "Display Credentials" in the action, the username and password will be displayed, so use this.

pepper-python script example


  url = "https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?accept=audio/wav&voice=ja-JP_EmiVoice"
  param = {"output" : "hello_world.wav", "text" : message}
  filePath = self.appFolder + "/" + self.getParameter("file name")
  r = requests.get(url, auth=("{username}", "{password}"), params=param)
  outfile = open(filePath, 'wb')
  outfile.write(r.content)
  outfile.close()

I'm using the python requests module for http get. This area will be helpful. http://qiita.com/n0bisuke/items/5b782bb758ce5611cc90

In param, the output (download) file name and the text of the conversion source are set. In requests.get, set the above credentials and param and issue a request

It will be saved as ʻoutfile.write (r.content)in the location that was set tofilePath` in Pepper. Then play it in the Play Sound box and you're done.

Recommended Posts

I tried mushrooms Pepper x IBM Bluemix Text to Speech
I tried Watson Speech to Text
I tried using Azure Speech to Text.
I tried to classify text using TensorFlow
I implemented Google's Speech to text in Django
I tried to multiply bouncing balls (occasionally x100)
I tried to debug.
I tried to paste
I tried to learn PredNet
I tried to organize SVM.
I tried to implement PCANet
I tried to reintroduce Linux
Speech to speech in python [text to speech]
I tried to introduce Pylint
I tried to summarize SparseMatrix
I tried to touch jupyter
I tried to implement StarGAN (1)
I tried to make a simple text editor using PyQt
I tried to let Pepper talk about event information and member information
I tried to display GUI on Mac with X Window System
I tried to implement Deep VQE
I tried to create Quip API
I tried to touch Python (installation)
I tried to implement adversarial validation
I tried to explain Pytorch dataset
I tried to touch Tesla's API
I tried to implement hierarchical clustering
I tried to organize about MCMC.
I tried to implement Realness GAN
I tried to move the ball
I tried to estimate the interval.
I tried to imitate Python x Kivy de Kinoppy (Kinokuniya bookstore app)
I tried to visualize the text of the novel "Weathering with You" with WordCloud
I tried to create a linebot (implementation)
I tried to summarize Python exception handling
I tried to implement PLSA in Python
English speech recognition with python [speech to text]
I tried to implement Autoencoder with TensorFlow
I tried to summarize the umask command
I tried to implement permutation in Python
Wrangle x Python book I tried it [2]
I tried to create a linebot (preparation)
I tried to recognize the wake word
I tried to get started with Hy
I tried to implement PLSA in Python 2
Python3 standard input I tried to summarize
I tried to summarize the graphical modeling.
I tried adding post-increment to CPython Implementation
I tried to implement ADALINE in Python
I tried to let optuna solve Sudoku
I tried to estimate the pi stochastically
I tried to touch the COTOHA API
I tried to implement PPO in Python
I tried to implement CVAE with PyTorch
Wrangle x Python book I tried it [1]
I tried to make a Web API
I tried to solve TSP with QAOA
[Python] I tried to calculate TF-IDF steadily
I tried to touch Python (basic syntax)
I tried my best to return to Lasso
I tried to summarize Ansible modules-Linux edition