Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #--------------------------------------------------------------------------------------------
- # Use:
- # echo "Some message" | ./tospeech.sh "The KeY tO EnCryPt by"
- # cat somefile.doc | ./tospeech.sh "The KeY tO EnCryPt by"
- #
- # Q. How do you decrypt?
- # A. Listen to the mp3. Type in the letters as they are spoken.
- # (Alpha is 'A' Bravo is 'B' etc. ALL CAPS)
- # Make sure to type spaces between every 5 letters.
- # Save as text file. Then run this command:
- # $ codegroup -d typedtext.txt | ccrypt -d -K "The KeY EnCryPteD by" > somefile.doc
- #
- #--------------------------------------------------------------------------------------------
- ccrypt -K "$1" | codegroup | tr '\n' ' '| (
- #--------------------------------------------------------------
- #bzip -9 | ccrypt -K "$1" | codegroup | tr '\n' ' '| (
- #codegroup | tr '\n' ' '| (
- #--------------------------------------------------------------
- # while loop
- while IFS= read -r -n1 c
- do
- case "$c" in
- A) echo -n "Alpha " ;;
- B) echo -n "Bravo " ;;
- C) echo -n "Charlie " ;;
- D) echo -n "Delta " ;;
- E) echo -n "Echo " ;;
- F) echo -n "Foxtrot " ;;
- G) echo -n "Golf " ;;
- H) echo -n "Hotel " ;;
- I) echo -n "India " ;;
- J) echo -n "Juliet " ;;
- K) echo -n "Kilo " ;;
- L) echo -n "Lima " ;;
- M) echo -n "Mike " ;;
- N) echo -n "November " ;;
- O) echo -n "Oscar " ;;
- P) echo -n "Papa " ;;
- Q) echo -n "Quebec " ;;
- R) echo -n "Romeo " ;;
- S) echo -n "Sierra " ;;
- T) echo -n "Tango " ;;
- U) echo -n "Uniform " ;;
- V) echo -n "Victor " ;;
- W) echo -n "Whiskey " ;;
- X) echo -n "X-ray " ;;
- Y) echo -n "Yankee " ;;
- Z) echo -n "Zulu " ;;
- " ") echo -n ". " ;;
- esac
- done
- ) | espeak --stdin -v en-gb --stdout | avconv -y -i - test.mp3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement