![見出し画像](https://assets.st-note.com/production/uploads/images/134982138/rectangle_large_type_2_fefcc29a87041c546019e7a854fc8522.png?width=800)
Micro Pthon のロボットボイスで、マイコン micro:bitに歌ってもらいました
私にとって、一度は行ってみたい場所は、ロボットと人間が密に暮らす世界です。犬の散歩をしている人をみるように、ロボットと散歩している人をみる感じです。そんな世界を想像しながら、MicroPython Automated Mouth (SAM)ライブラリを使って、micro:bit に、 bling bang bang borin を歌ってもらいました。下記リンクよりショート動画をご覧ください。ロボットが近づいてくる感覚になれるかもしれませんね。
ソースは下記にあります。繰り返し文とかよくわからず、コピペの繰り返しで見苦しいですが、改善案はコメントにお願いします。
***********************************
import speech from microbit import * speech.say("bling", pitch=110, speed=62, mouth=160, throat=120) speech.say("bang", pitch=130, speed=92, mouth=160, throat=120) speech.say("bang", pitch=130, speed=82, mouth=160, throat=120) speech.say("bling", pitch=110, speed=62, mouth=160, throat=120) speech.say("bang", pitch=130, speed=92, mouth=160, throat=120) speech.say("bang", pitch=130, speed=82, mouth=160, throat=120) speech.say("bling", pitch=140, speed=62, mouth=160, throat=120) speech.say("bang", pitch=140, speed=92, mouth=160, throat=120) speech.say("bang", pitch=160, speed=82, mouth=160, throat=120) speech.say("born", pitch=180, speed=102, mouth=160, throat=120) speech.say("bling", pitch=90, speed=62, mouth=160, throat=120) speech.say("bang", pitch=110, speed=92, mouth=160, throat=120) speech.say("bang", pitch=110, speed=82, mouth=160, throat=120) speech.say("bling", pitch=110, speed=62, mouth=160, throat=120) speech.say("bang", pitch=130, speed=92, mouth=160, throat=120) speech.say("bang", pitch=130, speed=82, mouth=160, throat=120) speech.say("bling", pitch=140, speed=62, mouth=160, throat=120) speech.say("bang", pitch=140, speed=92, mouth=160, throat=120) speech.say("bang", pitch=160, speed=82, mouth=160, throat=120) speech.say("born", pitch=180, speed=102, mouth=160, throat=120) speech.say("bling", pitch=90, speed=62, mouth=160, throat=120) speech.say("bang", pitch=110, speed=92, mouth=160, throat=120) speech.say("bang", pitch=110, speed=82, mouth=160, throat=120) speech.say("bling", pitch=110, speed=62, mouth=160, throat=120) speech.say("bang", pitch=130, speed=92, mouth=160, throat=120) speech.say("bang", pitch=130, speed=82, mouth=160, throat=120) speech.say("bling", pitch=140, speed=62, mouth=160, throat=120) speech.say("bang", pitch=140, speed=92, mouth=160, throat=120) speech.say("bang", pitch=160, speed=82, mouth=160, throat=120) speech.say("born", pitch=180, speed=102, mouth=160, throat=120) speech.say("To", pitch=110, speed=182, mouth=160, throat=120) speech.say("the", pitch=130, speed=162, mouth=160, throat=120) speech.say("next", pitch=80, speed=182, mouth=160, throat=120) speech.say("To", pitch=110, speed=182, mouth=160, throat=120) speech.say("the", pitch=110, speed=162, mouth=160, throat=120) speech.say("i", pitch=80, speed=162, mouth=160, throat=120) speech.say("chiy", pitch=110, speed=222, mouth=160, throat=120) speech.say("bang", pitch=60, speed=222, mouth=160, throat=120) speech.say("way", pitch=80, speed=222, mouth=160, throat=120) speech.say("yee", pitch=80, speed=222, mouth=160, throat=120)
この記事が気に入ったらサポートをしてみませんか?