Putting an image on a Raspberry Pi

  1. Download a .raw.xz file
    1. In this case, it was https://download.opensuse.org/distribution/leap/15.4/appliances/openSUSE-Leap-15.4-ARM-KDE-raspberrypi.aarch64.raw.xz
    2. Yes, I also downloaded the .sha256 file and ran sha256sum against the downloaded image to make sure the image file was not damaged during transfer.
  2. Open a terminal session and become root
  3. Determine which device the SD card is
    1. In this case, it was /dev/sdc
  4. Copy the image file to the SD card
 xzcat /home/david/Downloads/openSUSE-Leap-15.4-ARM-KDE-raspberrypi.aarch64.raw.xz | dd bs=4M of=/dev/sdc iflag=fullblock oflag=direct status=progress; sync

Amazon Transcribe gotcha

I needed to transcribe some minutes from a meeting, and only one person was speaking during a particular three minute piece. So I copied that segement out to it’s own MP3 file.

I uploaded the file to s3:// and ran a default transcription job. Whoops.

By default, I mean that, mostly I clicked Next, Next, Next. I supplied a job name, an input file, and an output file. (That I used an output file location other than default means it wasn’t exactly default settings).

After the transcription job was done, because I had not specified the quantity of speakers, it left out the 'speaker_labels' data from the JSON file.

I have been using https://github.com/trhr/aws-transcribe-transcript/transcript.py to simplify the JSON into text, but it does not handle files with missing speaker labels.

Sigh. Now I have to re-do the transcription, which will incur another charge. Those speaker_labels are all over the file when present.

For what it is worth, the tasks were essentially:

  1. Upload the file to S3
    1. aws s3 cp /home/david/Documents/some_path/review_of_previous_board_meeting.mp3 s3://some_s3_bucket/
  2. Log in to Amazon Transcribe and create a job
    1. Job name was review_of_previous_board_meeting
    2. Input file was s3://some_s3_bucket/review_of_previous_board_meeting.mp3
    3. Output file was s3://some_s3_bucket/review_of_previous_board_meeting.json
      1. This did require clicking the button “Customer specified S3 bucket”
      2. I used the AWS CLI commands to copy between my local machine and the S3 bucket, so it is easier if I name the bucket I want the files in.
    4. Click Next
    5. THE IMPORTANT PIECE: Audio Identification = On, and audio identification type = speaker identification
      1. Stupidly, you have to define the count of speakers, and 1 single speaker is an invalid minimum. So I have to tell it there were two speakers, when I had clipped the MP3 file to only contain one.
  3. Download the file from S3
    1. aws s3 cp s3://some-s3-bucket/review_of_previous_board_meeting.json /home/david/Documents/some_path/
  4. Clean up the transcription
    1. transcript.py /home/david/Documents/some_path/review_of_previous_board_meeting.json
    2. And then transcript.py runs without errors. The result is file review_of_previous_board_meeting.json.text

Amazon Echo as an alarm clock with playlists

Don’t bother.

It can be done, but man, what a pain in the ass.

First, create your play lists in the Amazon Music App. I prefer to have the Amazon Music App in offline mode, but for this step it must be in online mode. This makes sense, because the Echo devices are online devices.

Creating a playlist

  • Click on Library, then Playlists, then +NewPlaylist
  • Give your playlist a name. I’ll use Friday Morning Playlist
  • Hit Save
  • Hit Done
    • This is because, immediately after creating a new playlist, the only songs available to me are Recently Played with no option to pick a different list. From my point of view, this is a UI failure.
    • I was doing this on my smartphone. The process may suck less on a desktop.
  • You will be on the name of the playlist with a message that you have not added any songs yet. Click the three vertical dots button for more options.
  • Click the +AddMoreSongs button
  • Now you have your choice of Artists, Albums, or Songs
    • What songs do you want to wake up to, in what order? You decide. 😍
    • I should probably point out that I had previously gone into the Amazon Music App and fully populated “My Songs” in my library. If you haven’t done this, well it is one more step to do. The only good thing about this is that you can get the Amazon Music App on your desktop computer, and (while in online mode) it syncs up to AWS.
  • Click Done

At this point, you want to exit the Amazon Music App on your smartphone. It wouldn’t hurt to give it a few seconds to sync up to AWS before exiting. The reason you need to exit the app on your smartphone is because it is listening, and you are about to give a voice command to your Amazon Echo. If you don’t exit the app on your smartphone, it will respond instead of your Echo.

Implementing an alarm with playlist

  • Speak at your Amazon Echo “Alexa, set alarm for every Friday to play Friday Morning Playlist”
  • Your Echo will respond with “Alarm set for what time?” Say your alarm time.
  • Your Echo will respond that it has set an alarm.

Checking your work

  • Open the Amazon Alexa App
  • Find your way to Alarms & Reminders
  • The things I have had to look for was if the alarm was set for every week versus do-not-repeat, and if it was actually set for the playlist I want. It seems to me that the programmers at Amazon don’t want to play me what I want, they want to play me what their algorithm comes up with. I suspect that they think that by forcing new songs down my throat, they will entice me into signing up for their monthly service for even more variety.

Follow up commentary

I am happy sad that I can now no longer wake up to exactly the songs I want to, in order. All is not perfect, however. My life is happiest when I have a particular routine, and that routine starts with waking up. What I would like to do is:

  1. Alarm clock plays Song Number 1. I wake up and (mentally) sing along with the song.
  2. I hit the snooze, climb out of bed, and start the shower on hot water, at a trickle.
  3. Climb back into bed, and start praying. Thanks first, grattitude list second, and people on my prayer list third.
  4. Snooze timer expires, and more music plays. Maybe I sing along, maybe I hit snooze again and go back to praying.
  5. Repeat step 4 until it is time to climb out of bed and hit the shower. I also have some Alexa routines which turn on the lights and brighten them as time passes.

So the problem is the “snooze” function. If I speak at the Echo device “Alexa, snooze” then it does so; but, when the snooze timer expires, the Echo starts back on Song Number 1 of the playlist.

Kind of makes the playlist work pointless.

Not entirely, however. “Friday Morning Playlist” is not likely to be mistaken by Alexa for some random song, and, is short and sweet and understandible. If I were to say “Alexa, set alarm for every Friday to play Timbuk3 The Future’s So Bright, I Gotta Wear Shades” I can almost guarantee you that Alexa would not get it. Yes, I have tried. Wow did it take a lot of tries to get Alexa to finally figure out which song I was referring to. In retrospect, it would have been a lot easier to create a playlist of one song with a short sweet name and use that.

I did try “Alexa, pause playlist for six minutes” That was interpreted as “Alexa, stop” 😒

So a good snooze function still eludes me.

Also, I would like an Echo device with a snooze button, and the LCD display like the Echo Dot with Clock except with the good speaker of the six inch Echo with premium sound.

Saturday Night Live should just give up

In today’s climate, and with the concessions Lorne Michaels has had to make over the years, it will never be as funny as this: U.S. Ministry of Truth Interrogates Man Who Shared Misinformation

I remember watching SNL as a kid, back in the 1970’s. It was truly hilarious. 1970’s SNL would have done this skit, exactly, this coming Saturday.

Today’s SNL is likely getting pressured to let Nina Jankowicz host the show instead of (correctly) being mocked on it.

Lorne Michaeals probably sees that SNL is in hospice care. His beloved baby has grown ill, and it’s terminal.

He should do the right thing and pull the plug. Let it die with at least a little dignity left.

I doubt that his corporate owners will let him do that, however.