Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
darrenjrobinson / Convert Speech to Text.ps1
Last active July 23, 2021 16:55
Convert Speech to Text with PowerShell and Azure Cognitive Services STT
# Audio Phrase
$audiofile = Get-ChildItem "C:\temp\speech2convert.wav"
# Read audio into byte array
$audioBytes = [System.IO.File]::ReadAllBytes($audiofile)
# API Key
$key1 = "your api key"
# Conversion URI
$conversionURI = "https://speech.platform.bing.com/speech/recognition/interactive/cognitiveservices/v1?language=en-us&format=detailed"
# Conversion Headers
$Headers = @{
@msdotnetclr
msdotnetclr / run_azure_sql_sp_with_powershell.md
Last active February 21, 2020 07:49
Run Stored Procedure in Azure SQL with PowerShell Script
  1. Install PowerShell. Follow instructions at https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell?view=powershell-5.1
  2. Install Azure PowerShell 4.4. Follow instructions at https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-4.4.0
  3. Start PowerShell and execute the following commands to create a credential file for Azure auto-login later.
######################################################################
# interactive login to Azure Resource Manager with your Azure Account
Login-AzureRmAccount 
# print the list of subscriptions you have access to
Get-AzureRmSubscription