AI Book Engine Spoken Books
Sabbath, Quran, Christianity
Remark: for your convenience I've added the latest full code: (the code is "as is", ugly, not refined but just to grab the ideas and make it better)
Imagine you don't have time to read a book, but want to listen to a summary. Or you have a range of topics in your mind about a lecture you must give, a discussion about theological disputes or just interesting theological analysis, some old knowledge that is not easy to dig up so you want some lectures on math, biology, chemical topics and whatnot?
This article will show you a couple of things.
The result of this idea and code is that you can make ANY spoken book you can listen to, even a summary of for example the book "I Robot", by Isaac Asimov.
I give you 4 examples of such books:
First I give you the code, as is. Ugly, but working and easy to understand. To really understand the code: read previous articles:
else if (args[0].Equals("talkfile"))
{
string appPath = AppDomain.CurrentDomain.BaseDirectory;
string filePath = "FileTalk.txt"; // Replace with your file path
List<string> lines = new List<string>();
_language = args[1];
try
{
// Read all lines from the file
using (StreamReader reader = new StreamReader(filePath))
{
string line;
while ((line = reader.ReadLine()) != null)
{
// Add each line to the list
lines.Add(line);
}
}
// Optional: Print lines to console for verification
foreach (string l in lines)
{
// Splitting the line into parts
string[] parts = l.Split("\" \"");
// Assuming the format is always correct and parts length is at least 5
string question = parts[1].Trim('"');
_speed = float.Parse(parts[3]);
string language = parts[2].Trim('"');
_AILevel = Convert.ToInt16(parts[4].Replace("\"", ""));
// Your CheckLevelOfAIAnswer method call here
// You need to define this method and the speechSynthesizer object
// CheckLevelOfAIAnswer(speechSynthesizer, "Not implemented level 1 AI", "Not implemented level 2 AI", question);
// For demonstration, just printing the values
Console.WriteLine($"Question: {question.Replace("_", " ")}, Speed: {_speed}, Language: {language}, AILevel: {_AILevel}");
CheckLevelOfAIAnswer(speechSynthesizer,
"Not implemented level 1 AI",
"Not implemented level 2 AI",
question.Replace("_", " "));
}
}
catch (IOException e)
{
Console.WriteLine("An error occurred while reading the file:");
Console.WriteLine(e.Message);
}
}
Secondly, I give you the way you can make the content of the file being read by AI through AI. Feed this to ChatGPT and you get the content format.
Give the content of a file in this format given with all the chapters of the book I Robot of Isaac Asimov where <chapter> is replaced by the name of the chapters.
"talk" "<chapter title>" "US" "0.85" "3"
The above example creates the following content for the file to be read by AI.
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Introduction" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Robbie" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Runaround" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Reason" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Catch That Rabbit" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Liar!" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Little Lost Robot" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Escape!" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Evidence" "US" "0.85" "3"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: The Evitable Conflict" "US" "0.85" "3"
Then if you give the command to the given code like this, it will read the file called filetalk.txt residing in the same folder as the executable file, walk through it, and give you the outcome of the second parameter:
"talkfile" "US"
"talk" "Give a deep and profound analysis in story format of the chapter from I Robot of Isaac Asimov called: Evidence" "US" "0.85" "3"
Here is an example of the filetalk.txt with the Shabbath Morning Service, which I used to get my mind focused on this holy Saturday morning.
"Why are you writing on Shabbath?", I hear you ask. Well, I'm a Jew very much in awe of the Wisdom of Jesus and as we all know, Jesus said something like this: "If you can do something on Shabbath that can help people, do you think God will forbid you to do so? I say not, God will not forbid you to do something on SHabbath if it can benefit other people."
And preferably of course we're talking about 'labour" related to God's service. Not making billions on SHabbath through weapon deals so you can give millions to the poor, while other millions are killed by the same actions. Well, you get the drill.
Happy coding!
"talk" "Opening Blessings. For Shabbath Morning Service. Give an extensive explanation of the content. DO NOT speak out the prayers and verses." "US" "0.85" "3"
"talk" "Opening Blessings. For Shabbath Morning Service. Speak out the whole content of all prayers, songs and verses ONLY out in English." "US" "0.85" "3"
"talk" "Pesukei Dezimra (Verses of Praise). For Shabbath Morning Service. Give an extensive explanation of the content. DO NOT speak out the prayers and verses." "US" "0.85" "3"
"talk" "Pesukei Dezimra (Verses of Praise). For Shabbath Morning Service. Speak out the whole content of all prayers, songs and verses ONLY out in English." "US" "0.85" "3"
"talk" "Shema and its Blessings. For Shabbath Morning Service. Give an extensive explanation of the content. DO NOT speak out the prayers and verses." "US" "0.85" "3"
"talk" "Shema and its Blessings. For Shabbath Morning Service. Speak out the whole content of all prayers, songs and verses ONLY out in English" "US" "0.85" "3"
"talk" "Amidah (The Silent Prayer). For Shabbath Morning Service. Give an extansive explanation of the content. DO NOT speak out the prayers and verses." "US" "0.85" "3"
"talk" "Amidah (The Silent Prayer). For Shabbath Morning Service. Speak out the whole content of all prayers, songs and verses ONLY out in English." "US" "0.85" "3"
"talk" "Torah Service. For Shabbath Morning Service. Give an extensive explanation of the content. DO NOT speak out the prayers and verses." "US" "0.85" "3"
"talk" "Torah Service. For Shabbath Morning Service. Speak out the whole content of all prayers, songs and verses ONLY out in English." "US" "0.85" "3"
"talk" "Musaf (Additional Prayer). For Shabbath Morning Service. Give an extansive explanation of the content. DO NOT speak out the prayers and verses." "US" "0.85" "3"
"talk" "Musaf (Additional Prayer). For Shabbath Morning Service. Speak out the whole content of all prayers, songs and verses ONLY out in English." "US" "0.85" "3"
"talk" "Aleinu and Concluding Prayers. For Shabbath Morning Service. Give an extensive explanation of the content. DO NOT speak out the prayers and verses." "US" "0.85" "3"
"talk" "Aleinu and Concluding Prayers. For Shabbath Morning Service. Speak out the whole content of all prayers, songs and verses ONLY out in English." "US" "0.85" "3"
Or if you want to have the Psalms for the SHabbath Saturday morning:
Give the content of a file in this format given with all the chapters of the Psalms used during the Shabbath Morning Saturday Service where <chapter> is replaced by the name of the chapters.
"talk" "<chapter title>" "US" "0.85" "3"
Resulting in: (where you can adjust the second parameter to make it more what you want)
"talk" "Psalm 23" "US" "0.85" "3"
"talk" "Psalm 92" "US" "0.85" "3"
"talk" "Psalm 100" "US" "0.85" "3"
"talk" "Psalm 121" "US" "0.85" "3"
"talk" "Psalm 150" "US" "0.85" "3"
"talk" "Speak out the content of Psalm 23" "US" "0.85" "3"
"talk" "Speak out the content of Psalm 92" "US" "0.85" "3"
"talk" "Speak out the content of Psalm 100" "US" "0.85" "3"
"talk" "Speak out the content of Psalm 121" "US" "0.85" "3"
"talk" "Speak out the content of Psalm 150" "US" "0.85" "3"
Sky and your imagination are the only limits to the possibilities.
The Quran
Like, using the Quran. First, ask ChatGPT to give some content for the Saturday Morning Service:
Give the content of a file in this format given with all the chapters of the Quran prayers for the Saturday Morning Service where <chapter> is replaced by the name of the chapters.
"talk" "<chapter title>" "US" "0.85" "3"
This gives the following results: (knowledge I find interesting and wanna know)
The Quran is divided into chapters known as "Surahs" and not traditional chapters or titles. Additionally, the Saturday Morning Service in Islamic tradition does not typically involve reciting entire Surahs from the Quran but may include specific verses or passages relevant to the service.
Here's an example of how you can format content using the Surah numbers and verses for the Saturday Morning Service:
"talk" "Surah Al-Kahf (18:1-10)" "US" "0.85" "3"
"talk" "Surah Ar-Rahman (55:1-13)" "US" "0.85" "3"
"talk" "Surah Al-Jumu'ah (62:1-11)" "US" "0.85" "3"
These are just a few examples of Surahs and specific verses that may be recited or recited during the Saturday Morning Service. You can replace these with the specific Surahs and verses used in your service. Please consult with your religious leader or community to ensure you are following the appropriate recitations for your specific tradition.
From that text, I pick this part:
"talk" "Surah Al-Kahf (18:1-10)" "US" "0.85" "3"
"talk" "Surah Ar-Rahman (55:1-13)" "US" "0.85" "3"
"talk" "Surah Al-Jumu'ah (62:1-11)" "US" "0.85" "3"
I could adjust like following:
"talk" "Speak out in English the content of Surah Al-Kahf (18:1-10)" "US" "0.85" "3"
"talk" "Speak out in English the content of Surah Ar-Rahman (55:1-13)" "US" "0.85" "3"
"talk" "Speak out in English the content of Surah Al-Jumu'ah (62:1-11)" "US" "0.85" "3"
I could enhance that by asking for extended explanations and such. Again: your wishes and imagination are the limit.
After the previous, I put the content in "Filetalk.txt" and I can give this command:
"talkfile" "US"
After which I'm into the morning prayer of the Quran.
Christianity
For the Christians, I could ask:
Give the content of a file in this format given with all the chapters of the Christian prayers for the Sunday Morning Service of 17 December 2023 where <chapter> is replaced by the name of the chapters.
"talk" "<chapter title>" "US" "0.85" "3"
Which gives the interesting answer:
Christian Sunday Morning Services typically include specific Bible passages, such as readings from the Old Testament, New Testament, and Psalms. The specific passages and chapters used can vary depending on the denomination and liturgical calendar. Since the date mentioned is specific (December 17, 2023), it's important to note that the readings may follow a specific lectionary or church calendar.
Here are examples of Bible passages that might be included in a Christian Sunday Morning Service, including passages from the Old Testament, New Testament, and Psalms:
These passages are just examples, and the actual readings for December 17, 2023, may vary depending on the Christian tradition and the specific liturgical calendar followed by the church. To get the exact readings for that date, it's advisable to consult the church's liturgy or check with the clergy or church leaders.
I pick again this part:
"talk" "Isaiah 7:10-16" "US" "0.85" "3"
"talk" "Psalm 80:1-7, 17-19" "US" "0.85" "3"
"talk" "Romans 1:1-7" "US" "0.85" "3"
"talk" "Matthew 1:18-25" "US" "0.85" "3"
I put that in the file "Filetalk.txt" after which I can give the command:
"talkfile" "US"
And I'm into the Christian service.
Extending to other religions
Of course, it is needless to say that I could extend this to other faiths and religions.
Remark: It is very interesting to observe that the essence of many prayers and parts of holy books have many similarities. Again: we're ONE.