Sunday, November 14, 2021

AWS Polly - Text to Speech Service

Online service (browser-based)

https://console.aws.amazon.com/polly/home/SynthesizeSpeech

(Log on to aws, go to Polly. Very simple)


Command Line interface (CLI) service

1 Log on to aws and create an IAM user

  • add a user with username: administrator with management console access
  • create an admin group with admin access policy. add user to the group
  • create an access key ID and secret access key
    sign in: https://console.aws.amazon.com/iam/
    user - security credentials - access keys - create access key
    download the key pair file (.csv) to your local computer 
2. install application: https://awscli.amazonaws.com/AWSCLIV2.msi
  • check after installation: c:\> aws --version
3. configure aws CLI
  • aws configure
    copy/paster key id, access key, input default region
4 start using Polly from command line. Examples:

aws polly synthesize-speech ^
    --output-format mp3 ^
    --voice-id Joanna ^
    --text "Hello, my name is Joanna. I learned about the W3C on 10/3 of last year." ^
    hello.mp3

hello.mp3

aws polly synthesize-speech^ // load text from a file
  --output-format mp3 ^
  --voice-id Brian^
  --text file://war1.txt ^
  war1.mp3

aws polly start-speech-synthesis-task ^ //save to S3
  --engine neural ^
  --region us-west-2 ^
  --endpoint-url "https://polly.us-eest-1.amazonaws.com/" ^
  --output-format mp3 ^
  --output-s3-bucket-name chris.hare ^
  --voice-id Joanna ^
  --text file://war1.txt

 With SSML (synthesis markup language), you add tags such as news, conversational, lexicon and add break, emphasis, etc. 

Monday, July 19, 2021

Quantum Computing for Beginners

There are three important properties of quantum mechanics:

Superposition, Entanglement, and Interferences 

Superposition

For colors, b/w has 2 colors, gif has 256 colors, same as VGA (2^8), SVGA has 2^16=65536 colors, true color (24bit) has 2^24 = 16 million, deep color has 2^30 = 1 billon colors. Now we are using digital computer. The binary system has two numbers 0 and 1. So we are at b/w stage. 

For music, bugle has 5 notes (or may be three), march/pop songs/national anthem uses mostly 7 notes, opera/orchestra/Mozart uses 12 notes. As we know, orchestra has more details and rich melody than bugles. You can consider using a digital computer is kind of listening bugle instead of orchestra music. 

The superposition property enables quantum computers to represent more information in each unit (qubit) therefore a vast amount of data can be processed in one step. 

Entanglement

We know that twin brothers or sisters can somehow "communicate" even though they are physically apart. It seems there is something (or someone) that sends information between each other. 

Players in Matching bands synchronize with the conductor. This means, one move, all follows. 

The entanglement property "sends" information from one particle to another without delay. It seems there is a super force (God?) to control the particles' rotations with the identical angles along XYZ axes. Once entangled, one can control all qubits by just manipulating one qubit. (The others will follow). It functions like a lever. 

Interferences

Throwing two rocks in still water you will see waves and when two waves meet, they add or cancel base on the phases of the waves. 

A clock (minute hand) is a good example to explain phases. 12 o'clock is considered phase = 0, at 5 minute phase = 15 (degree), at 15 minute phase = 90. After one hour, the minute hand goes back to phase =0.

---------------

Summary

Entangled qubits have a vast number of different phases (considering distributing on a clock), most of them cancel each other (eg. 5 minute and 35 minute cancel each other). Some add up (remember waves). In the end, a few that with same phase become much larger (fit) than the rest. They are the solutions to the problem. 

If you know genetic algorithm or evolutionary computation, it functions similar, same is true comparing to the human evolution. The fit species remain and get better (more fit). Unfit species disappear.

[This explanation uses a form of story teller rather than Einstein level scientific definitions and quantum theory.]

Sunday, February 7, 2021

Forensic Analyzing Memory Image - Bulk-extractor

Bulk_extractor is a program that extracts features such as email addresses, credit card numbers, URLs, and other types of information from digital evidence files. It is a useful forensic investigation tool for many tasks such as malware and intrusion investigations, identity investigations and cyber investigations, as well as analyzing imagery and pass-word cracking.

  1. Start Kali Linux and download memdump.mem [512 MB]
  2. Run bulk_extractor -o bulk wordlist memdump.mem. The results will be placed in the "bulk" folder. 
  3. Run cd bulk and then ls -l you will see a list of files
  4. Use nano to view the files
    • nano domain_histogram.txt. You will see domains visited on this computer and the number of times. You can use ctrl+W to search term, eg. ccsf.edu
    • ctrl+X to close nano.
    • nano ccn_historam.txt You will see the credit card numbers found. 
    • nano wordlist.txt. You will see the words and the frequency. Useful for cracking encrypted files.

Note: Copy files from host to VM: you need to shutdown the guest and setup the "shared folder" so VM can access files on a folder on the host. Or you can enable USB on VM so you can access files through USB on guest. 








Reference: https://samsclass.info/121/proj/p4-Bulk.htm