Google AIY Voice Kit’s, Google Assistant API Authorization, For the Second

This article assumes that you already created a project for this AIY Voice Kit and made enable to use Google Assistant API , and created OAuth 2.0 client ID.

  1. Download the credential JSON file from your GCP account (your Voice Kit project).
    To do this, go to https://console.cloud.google.com and select your Voice Kit project from drop down menu bar that just next to the “Google Cloud Platform” letters which is the top position of your browser. After this, go to API & Services page, using search window, where is the center of the top bar. Type “API & Services” and click the drop down result. And click Credentials of left side menu. Check your Voice Kit project fnom OAuth 2.0 client IDs list. And Download the client_secret JSON file.
  2. Copy the content of the client_secret JSON file to your Raspberry Pi Zero AIY Voice Kit. The path and file name is ~/assistant.json of your Raspberry Pi Zero AIY Voice Kit. To do this. access to your Raspberry Pi Zero through ssh command from your Terminal. And make assistant.json file using touch command. Or Nano, Vi. Copy the contents of client_secret JSON file from your computer, and paste it to the ~/assistant.json file and save it by your text editor. You can do this through SSH connection.
  3. Launch ~/AIY-projects-python/src/examples/voice/assistant_grpc_demo.py python script and authorize your Voice Kit to the GCP project. After launch the python script, it outputs URL to authorization. So go to the URL using web browser and login to your Google Account. It will outputs the code to authorize your Voice Kit. Copy the code and paste it to the python script output after “Enter the authorization code: ” prompt.

That’s all you have to do to authorize your Voice Kit for the second.

The second nearest Supermarket exhibited taking Tuna to pieces show

Recently I don’t want to eat Sashimi after I got stomach ache because of Sashimi. It came back after for a while sometimes about over 1 month. Placebo like short period stomach ache continued.

A female child started cry in front of the Sushi corner in the supermarket.

I realized the show when I walked to take a shredded cabbage pack.

I thanked to the tuna life, and past through…

Japanese fishermen perhaps regard tuna fish as a big eater(gluttony).

Eats sea production too much. Whales also in the same context.

Personally, I feel there are mysterious ecology of wild lives, and we shouldn’t decide them as just big eaters easy.

After fishes regarded as having no pain nervous system, there treatment got worse. Curse of scientific research isn’t it?

As a spectacular, I’m 😭

I went to there to get cigarettes and soda.

But tuna is great taste….

Python Memo: Let’s get started Python

This was a mystery statement for me.

if __name__ ==”__main__”:

This seems

start position of module executed case…

Found clearer explanation from Learning Python, oreilly.

This statement check that the program file (module) is whether executed as a program or imported as module, and if it is as a program, do some statements in the if statement scope.

__name__ is a builtin attribute.

It’s like a bash or perl.

Useful variables which have attribute.

__init__.py

this module is necessary for each directories which used as package.

Review the weeks : February at Sunday

This week was relatively sunny so could go walking and short running again.

But couldn’t watch stars because the night sky weren’t clear so much.

Put in ordered books to boxes, and reflowing imac video card seems successful ✌️

Big Bang theory season 2 ended with North Pole story, my body condition is not so good.

My arms hurt so much.

Birds singing aloud.

Holy weekend 🤝

Read the bible✌️

Yona

 

=============================================================================

4th week Sun,24, Feb, 19

Today Monday, I couldn’t to write at Sunday…

I could watch stars last night at the nearest small park Asunaro.

It was relaxing time, so clear cool air was comfortable to inhale.

Could recognized Orion at least.

 

My RSI is same o same. But found nice japanese medical site.

Here

Free 14 days trial is enough. Don’t forget save pages as HTML files.

Trying injection treatment for my RSI.

Learned to shutdown pc and rest method this weekend…

iMac recommended to only sleep…

 

Daily memo 190129 Tue

First of all, forgot to go to TSUTAYA at 28th day when has number 8. The days have number 8 are 50% off cd rental…

I planned to rent Lion King OST, Hakuna Matata this is it.

Today cleaned my room, put books to a 📦 , read books around.

Unix philosophy, The weblog handbook, Dive into python…

Ai, leverage, web links collection

A primer on scientific programming with python

I read. It’s recently fashionable style way of writing tempo, and intriguing that it’s essential mathematical programming.

The academic hackers style😅

My name is Masa -> mather

Not mother 😂

So will write about math.

I’m planning start from facilitating my “Plotting program in Java and swing”. Because this includes a lot of important math elements. It’s think like a numerical world creatures…

Or something like secrets of arithmetics 😏

Jaydle Development Journal:JA(va) Y(outube)D(l)-E(xtended)

I’m going to make post about note of jaydle development.
This is program which enhance youtube-dl command.

First I made prototype in bash.

It can download simultaneously and can download by just search keywords.
E.G

“jaydle -keywords tsunami disasters”

will downloads result videos top 10 automatically.
And I have numbering option from the top search result.
So you can know the order of search result after downloading.

But this shell script needing edit somehow. LoL.

I’m planning to make public journal of Jaydle development. e.g. Implementing SwingWorker, Menu bar, Serialization of the store path, …

So watching me!!!

Programming column: A programming unified viewand

My case fun of programming started from bash script. Was really wanted to accustomed with unix or Linux culture bought tons of unix used books mainly under $10.. lol.

Before that I learned Java but it’s hard to living well with OS ( computing environment). Especially make files, directories, reading, writing, using regular expression and co-operating with environment.

Bash is perfect for co-work with the environments. But not Object Oriented so hard to code maintain and manage.

Once you got through one bash book ( My case O’reilly’s “Learning bash shell” Second edition maybe) u will be interested in Sed & Awk.

Sed is “Stream EDitor” by my memory. This using ed text editor inside might be? Ed is very old text editing program. AT&T Bell Lab’s product. Line orient and matrix(mother) of Vi text editor. It won’t even display whole text. 🤓 Because it’s for printer type display(teletype). In the era no crt display and printed to papers. So this was efficient for paper printer.

Awk is acronym for “Adrian will kome “. 🤕

This is splendid language, Jon Bentley was attracted . Perl’s main influencer..

Python is made by masters of low or middle level languages. There are tons of splendid libraries, functions and programming style guide lines.

The point of the view rom function builder on Java, python or frameworks like angular are built arts by the hackers.

Now they must be loving Arduino or Raspy because that’s EECS “Ying and Yang”.

Compiler knowledge is essential.

 

Almost Unix commands are written in C.
But those are very small programs. Like things between programs and API.
Programming approach history is getting generality as it in mathematical description.
Unix commands are more like organic, C? Lol.
I thought like this when reviewing Grep command usage and bash programming.

To be continued,,,

Eclipse error:Editor does not contain a main type or cannot be resolved to a type

eclipse error.jpeg

 

To begin from the cause and solve method…

serObj=load("jaydle.ser");

This statement causes all errors which eclipse said “cannot be resolved to a type” or something like that error.

It highlighted as red circle X, and the others are red light objects.
It said all of my original objects in the class are “cannot be resolved to a type” or something wrong.

From terminal (command line), I tried to compile and error occurred, it pointed

masa@em-p:~/Public/git/jaydle-project/jaydle-project$ javac src/jaydle/JaydlePrototype.java 
src/jaydle/JaydlePrototype.java:61: error: <identifier> expected
serObj=load("jaydle.ser");

So commented out the line,

all of errors disappeared and Mose came. lol.

 

I tried configure “Java build path” but it wasn’t effective.

Eclipse configuration is hard. And error detective system this case reverse effected….

See you!

Installing Qtractor: Made a lots errors

qtractor installing generated a lots of errors.

 

But official site introduced way to dependency programs install at once…

Plus I couldn’t install plugin effects this time, and not install yet….
I should perhaps re compile to add plugins…

sai means "sudo apt-get install" in my environment

ERROR MESSAGE1
*checking for Qt library version >= 5.1… no; Qt 5.1 or greater is required

-> sudo apt-get install qt5-default

 

ERROR MESSAGE2
*configure: error: *** SNDFILE library not found.

-> sai -libsndfile-dev

 

ERROR MESSAGE3
checking for qmake-qt5… no
configure: error: qmake-qt5 not found in current PATH. Maybe QT development environment isn’t available. (qt5-devel)

->sudo apt-get install qt5-qmake

Next I tried below commands but don’t know was necessary.

{-> sai qtchooser

->export QT_SELECT=5}

Next

-> sudo apt-get install qt5-default

 

next

ERROR MESSAGE4
checking for sndfile… no
configure: error: *** SNDFILE library not found.

-> sai -libsndfile-dev

 

next

ERROR MESSAGE5
Project ERROR: Unknown module(s) in QT: x11extras

 

->apt-cache search libqt5x11extras

->sai libqt5x11extras5-dev

solved
And then, did
“sudo make” and “sudo make install”
ERROR MESSAGE5
lupdate: could not exec ‘/usr/lib/x86_64-linux-gnu/qt5/bin/lupdate’: No such file or directory

->sudo apt-get install qttools5-dev-tools

FINISHED😃

 

qtractor

 

Ubuntu 16.04 LTS: Package broken error

My ubuntu couldn’t update because of linux-header missing. Ubuntu 16.04 LTS.

To tell the result first, “sudo apt-get clean, update, upgrade” solved this problem.

upgrade called grub install prompt, so perhaps avoiding this is better,
because grub configuration potentially makes boot error problem.

Below is just a memo about what happened while getting to solve the package broken error.

this post calling many people from search engines, please check my other posts if you are not in hurry. (Now Ubuntu 18 era, perhaps this is a common error on Ubuntu 16.04 LTS)

 

Package Broken

Check if you are using third party repositories. If so disable them, since they are a common source of problems.

Furthermore run the following command in a Terminal: apt-get install -f

Transaction failed: The package system is broken

The following packages have unmet dependencies:
linux-headers-4.4.0-139-generic: Depends: linux-headers-4.4.0-139 but it is not installed

linux-headers-4.4.0-139-lowlatency: Depends: linux-headers-4.4.0-139 but it is not installed

Below sentences are about -f option of apt-get install .( apt -f, –fix-broken option)

Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running
APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system’s dependency structure can be so corrupt as to require manual intervention (which usually means using dpkg –remove to eliminate some of the offending packages). Use of this option together with -m may produce an error in some situations. Configuration Item:
APT::Get::Fix-Broken.

Is linux-header api of c?

error message of desktop icon:
Error
Broken count > 0.

Error message of “sudo apt-get install linux-headers-4.4.0-139”
This situation needed “sudo apt-get clean” command.

masa@em-p:~$ sai linux-headers-4.4.0-139
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
linux-headers-4.15.0-34 linux-headers-4.15.0-34-generic linux-headers-4.4.0-137 linux-headers-4.4.0-137-lowlatency
linux-headers-4.4.0-138-generic linux-image-4.15.0-34-generic linux-image-4.4.0-137-lowlatency
linux-modules-4.15.0-34-generic linux-modules-extra-4.15.0-34-generic
Use ‘sudo apt autoremove’ to remove them.
The following NEW packages will be installed:
linux-headers-4.4.0-139
0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.
42 not fully installed or removed.
Need to get 0 B/10.1 MB of archives.
After this operation, 71.0 MB of additional disk space will be used.
(Reading database … 486606 files and directories currently installed.)
Preparing to unpack …/linux-headers-4.4.0-139_4.4.0-139.165_all.deb …
Unpacking linux-headers-4.4.0-139 (4.4.0-139.165) …
dpkg-deb (subprocess): cannot copy archive member from ‘/var/cache/apt/archives/linux-headers-4.4.0-139_4.4.0-139.165_all.deb’ to decompressor pipe: failed to read (Input/output error)
dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-139_4.4.0-139.165_all.deb (–unpack):
cannot copy extracted data for ‘./usr/src/linux-headers-4.4.0-139/arch/mips/include/asm/octeon/cvmx-npi-defs.h’ to ‘/usr/src/linux-headers-4.4.0-139/arch/mips/include/asm/octeon/cvmx-npi-defs.h.dpkg-new’: unexpected end of file or stream
Errors were encountered while processing:
/var/cache/apt/archives/linux-headers-4.4.0-139_4.4.0-139.165_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried these commands as I wrote first,

“sudo apt-get clean” (clear cache)

“sudo apt-get update” and “sudo apt-get upgrade”

These operations resolved Ubuntu 16.04: Package broken error this time.

apt, apt-get, and aptitude commands are very frequently used commands (also dpkg), but it takes time to accustom with. These are similar but different commands.

APT is an acronym for Advanced Package Tool.
apt-get’s design is different from apt, but their are using same library libapt-pkg as their base.
aptitude is a GUI project of APT.

In natural English language, aptitude means “natural ability or skill, especially in learning” by longman modern English-english dictionary.

Maybe using apt rather than apt-get is better.