A Batch Text-to-Speech converter that allows you to select multiple files at once and convert them to speech:
- Accepts text, PDFs, images, clipboard, or manual entry
- Batch processing of files
- Extracts text using OCR if needed
- Generates Individual audio files for each source
- share or save using the share sheet.
What's New
Version 1.0
First release
What it does
42 actions-
Set VariableInput
-
If
-
Choose from MenuChoose Input Source
-
Choose from MenuFiles
-
Select File
-
Choose from MenuPhotos
-
Select Photos
-
Choose from MenuClipboard
-
Get Clipboard
-
Choose from MenuManual Input
-
Ask for InputEnter Text
-
Set VariableInput
-
Repeat with Each
-
Get Type
-
If
-
Comment↓ Perform OCR on images
-
If
-
Extract Text from Image
-
Split Text
-
Combine Text
-
Add to Variable
-
Comment↓ check if PDF and extract the text. If there is no underlying text then perform OCR on pdf
-
If
-
Gettextfrompdf
-
If
-
Extract Text from Image
-
Add to Variable
-
If
-
Add to Variable
-
Split Text
-
Combine Text
-
Add to Variable
-
If
-
Get Text from Input
-
Add to Variable
-
Repeat with Each
-
Make Spoken Audio
-
Encode Media
-
Add to Variable
-
Quick Look
-
Share
-
Comment_TTS_ Convert text to audio. Accepts text,pdfs, or images and makes an audio file of the spoken text. runs OCR on images runs OCR on PDFs if there is no underlying text.
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/text'
#include 'actions/sharing'
#include 'actions/photos'
#include 'actions/documents'
#define color teal
#define glyph textBubble
@Input = ShortcutInput
if !@Input {
menu "Choose Input Source" {
item "Files":
selectFile(true)
item "Photos":
selectPhotos(true)
item "Clipboard":
getClipboard()
item "Manual Input":
prompt("Enter Text")
}
@Input
}
for _ in @Input {
const Type = typeOf(@Input)
if Type contains "Photo" || Type contains "Image" || Type contains "PDF" {
// ↓ Perform OCR on images
if Type contains "Photo" || Type contains "Image" {
const TextFromImage = extractImageText(@RepeatItem)
const SplitText = splitText(TextFromImage)
joinText(SplitText, " ")
@Texts
// ↓ check if PDF and extract the text. If there is no underlying text then perform OCR on pdf
}
if Type contains "PDF" {
const Text = getPDFText(@RepeatItem)
if Text['File Size'] == {
extractImageText(@RepeatItem)
@PDFText
} else {
@PDFText = Text
}
const SplitText1 = splitText(@PDFText)
joinText(SplitText1, " ")
@Texts
}
} else {
getText(@RepeatItem)
@Texts
}
}
for _ in @Texts {
const SpokenAudio = makeSpokenAudio(@RepeatItem)
encodeAudio(SpokenAudio)
@AudioFiles
}
quicklook(@AudioFiles)
share(@AudioFiles)
/*
_TTS_
Convert text to audio.
Accepts text,pdfs, or images and makes an audio file of the spoken text.
runs OCR on images
runs OCR on PDFs if there is no underlying text.
*/
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by te55eract
You Might Also Like
Advertisement