Tutorial

Detecting Digits with PowerShell

A person can look at a number and determine which digits are present. How would a script achieve this?

James Montgomery

13 minute read

Table of contents

TL; DR

Have you ever wondered, how many unique digits are in a number? Alternatively, how many times does a given digit appear in a number? Using PowerShell, I explore these questions in a variety of means and examples.

Google Cloud Text-to-Speech with PowerShell

A guide for using PowerShell with the Google Cloud Text-to-Speech API.

6 minute read

TL; DR

In this post, I’ll walk through the basics of using PowerShell to interact with the Google Cloud Text-to-Speech API. Partly a documentation exercise and somewhat a guide I’d like to have been able to read when I started on my Elite Dangerous Google Cloud Text-to-Speech project.

As such, we’ll start with a basic script to produce an audio file and explain how that works. Later I’ll walk through some parameters of interest to affect the response. Lastly, I’ll introduce how we can use SSML for a variation in response.

How to base64 decode on Windows 10 without base64.exe

Converting the base64 audio content response from the Google Cloud Text-to-Speech API into a playable file on windows using PowerShell.

2 minute read

TL;DR

You can call certutil from PowerShell to produce the required file.

Introduction

There is a moment in life where you get stuck in a quick start guide - we’ve all been there. At the start of my Google Cloud text-to-speech project it arrived quickly and unexpectedly at step two of this two-step quick start guide.

I had successfully returned my first base64 encoded speech audio, onward to the last step:

“Decode the source text file using the Base64.exe tool:”