text to speech (tts) .docx script for python using kokoro
text to speech (tts) .docx script for python using kokoro - gist:5e73a7a375c0409f47c5cb3d380d4910
This is how I've set up Text-to-Speech, using Kokoro
Install kokoro in terminal:
pip install kokoro>=0.9.2 soundfile python-docx
then create a .py file with the script, the code I have used is now available here: gist.github.com/SharedAcadem...
this creates a .wav file based on the .docx.
17.07.2025 15:41 β π 3 π 2 π¬ 1 π 0
then install an audiobook app for listening to longer files, as they enable bookmarking, note taking, and +10 and -10 second skips and rewinds, and enjoy listening
let me know if any of this needs more explanation and/or if it works for what you are wanting!
17.07.2025 15:41 β π 1 π 0 π¬ 1 π 0
.wav to .mp3
.wav to .mp3. GitHub Gist: instantly share code, notes, and snippets.
In the terminal, install
pip install pydub
and
brew install ffmpeg
Then run script to convert .wav into .mp3, available here: gist.github.com/SharedAcadem...
17.07.2025 15:41 β π 1 π 0 π¬ 1 π 0
Once the audio file creation is complete you end up with a .wav file that you could convert to mp3, which is more compact. you could also do it in one go with the above script, but as it makes further requirements on what is installed I have separated them.
17.07.2025 15:41 β π 1 π 0 π¬ 1 π 0
once you have the script set up as wanted, you can run it through the terminal. If you use software such as Visual Studio Code, the only thing you need to do is to make sure that the .docx file is in the same directory as the script, or else adjust the path in the configuration section of the script
17.07.2025 15:41 β π 1 π 0 π¬ 1 π 0
you can change voices and languages in the configuration section, here are some samples of voices huggingface.co/hexgrad/Koko...
The code above defaults to US English, for British English use language code 'b'
17.07.2025 15:41 β π 1 π 0 π¬ 1 π 0
text to speech (tts) .docx script for python using kokoro
text to speech (tts) .docx script for python using kokoro - gist:5e73a7a375c0409f47c5cb3d380d4910
This is how I've set up Text-to-Speech, using Kokoro
Install kokoro in terminal:
pip install kokoro>=0.9.2 soundfile python-docx
then create a .py file with the script, the code I have used is now available here: gist.github.com/SharedAcadem...
this creates a .wav file based on the .docx.
17.07.2025 15:41 β π 3 π 2 π¬ 1 π 0
Sure! Not sure how familiar these terms are so please forgive any redundant over-explanation
I use Visual Studio Code for convenience, but the combination of a plain text file saved as .py for the code and running it in the terminal works too.
17.07.2025 15:41 β π 1 π 0 π¬ 1 π 0
Went down a text-to-speech rabbit hole because my current version of Microsoft Word cannot read text out loud in a mechanical voice, and the AI app readers have a limit, and now I have a python script running in terminal creating an audiobook-for-the-purposes-of-proofreading-with-tired-eyes
17.07.2025 10:07 β π 2 π 0 π¬ 1 π 0
Isreal murdered 6 brothers delivering food to starving Gazans. The youngest was 10 years old.
14.04.2025 06:30 β π 3 π 5 π¬ 0 π 0
Fascist fucks.
And even if they did have a criminal record, this is still fascist fuckery.
07.04.2025 12:45 β π 102 π 25 π¬ 3 π 0
π¨New Publication on *Creating* Sexually Explicit Deepfakes & Criminal Law.
Pleased to share my latest research with Ruya Tuna Toparlak on why term 'sexual digital forgeries' is preferred, distinct harms of creation & analysis of law reforms around the world onlinelibrary.wiley.com/doi/10.1111/...
07.04.2025 07:08 β π 8 π 5 π¬ 2 π 0
Third ex-police officer arrested in Rotherham child sexual exploitation inquiry
Former officer with South Yorkshire force arrested on suspicion of raping teenage girl in 2004
A third police officer is arrested in Rotherham for raping a 14-year old girl.
When we say male sexual violence is "systemic", this is what we mean:
It's when a child victim of rape is either ignored by the police or raped by the police.
www.theguardian.com/uk-news/2025...
04.04.2025 09:31 β π 9 π 5 π¬ 0 π 0
Girls in England feel less safe at school than they did pre-Covid, survey finds
Study finds larger drop-off among girls aged 13-14 who feel safe than among boys, compared with age group in 2019
Here's a radical thought:
Assume that girls' feelings reflect facts.
Assume that girls can read their environment and are adept at risk assessment.
Assume that girls' are ... right. Take them seriously.
www.theguardian.com/education/20...
04.04.2025 10:06 β π 8 π 1 π¬ 2 π 0
Evidence of βexecution-styleβ killings of Palestinian aid workers by Israeli forces, doctor says
Forensic consultant says multiple bullets were used from short range in attack that has caused global outrage
A forensic doctor who examined the bodies of some of the 15 paramedics and Palestinian rescue workers shot dead by Israeli forces and buried in a mass grave in southern Gaza has said there is evidence of execution-style killing. www.theguardian.com/world/2025/a...
03.04.2025 06:16 β π 17 π 12 π¬ 0 π 4
Silence is Collaboration: Academics Must Speak Out Against Fascism
We write this in the wake of the illegal arrests of Mahmoud Khalil, Rumeysa Ozturk, Badar Khan Suri, Alireza Doroudi, and other foreign students and teaching faculty at American universities. We wiβ¦
"Samira Moyheddin recently wrote, '...Donβt stay in jobs where your knowledge is a liability.' [We are compelled] to say out loud, all the time, that if the university has become a place where our knowledgeβof genocide, Palestine, racism, fascismβis a liability, then we must change the university."
02.04.2025 14:43 β π 69 π 23 π¬ 1 π 2
thank you!
01.04.2025 09:56 β π 0 π 0 π¬ 0 π 0
We're In the Fight of Our Lives: What's at Stake This Transgender Day of Visibility
Teen Vogue spoke with advocate Angelica Christina about how trans people are feeling this TDOV.
βMy biggest advice to the trans youth out there is seek out your community, because we're out here. You have a community of people who love you, who are rallying around you, who support you β¦ You are not alone. We will fight with you and we will fight for you.β
Solidarity. Today and every day.
π³οΈββ§οΈ
31.03.2025 08:00 β π 33 π 12 π¬ 1 π 0
βClimate of fearβ: Montreal doctor says NYU cancelled her presentation
A Montreal doctor says her presentation at NYU was abruptly cancelled and believes the university did so out of fear of being pressured by the Donald Trump administration.
NYU canceled a planned speech by the former president of Doctors Without Borders because she planned to discuss the humanitarian crisis in Gaza and cuts to US AID.
This is what actual campus censorship looks like.
30.03.2025 17:07 β π 9289 π 3989 π¬ 232 π 316
And here it is: criminaljusticetheoryblog.wordpress.com/2025/03/28/i... Comments and reflections most welcome! Thanks to @marthe.bsky.social!
28.03.2025 10:08 β π 3 π 2 π¬ 0 π 0
Proposal to automatically give babies motherβs surname ignites row in Italy
Politician says idea would be βcompensation for centuries-old injusticeβ of children being assigned fatherβs name
Proposal to automatically give babies motherβs surname ignites row in Italy
Politician says idea would be βcompensation for centuries-old injusticeβ of children being assigned fatherβs name.
www.theguardian.com/world/2025/m...
29.03.2025 15:36 β π 10 π 6 π¬ 1 π 0
All jobs
Next week I will be publishing a postdoc vacancy on childrenβs rights & digital investigations to work @crisresearch.bsky.social in Brussels on a new EU Research Project on digital investigations of child sexual abuse. Keep an eye out for it here, linkedin and VUB jobsite! #criminology #crimsky
28.03.2025 15:51 β π 3 π 3 π¬ 0 π 1
Her name is Rumeysa Ozturk, she's a student from Turkey, and even her lawyer doesn't know where she is right now.
26.03.2025 17:47 β π 6691 π 2552 π¬ 112 π 110
Screenshot of Times article with headline: "Florida may loosen child labour laws to fill gap left by migrants"
The article explains a law has been proposed in Florida to allow children as young as 14 to work overnight shifts in agriculture & constraction to make up for lost migrant labour. Yes really.
You truly could not make it up.
You could not.
27.03.2025 09:34 β π 8136 π 3082 π¬ 846 π 604
CPP Colloquium
The Centre of Political Philosophy is pleased to announce a lecture by Marthe Goudsmit Samaritter, postdoc researcher at the Max Planck Institute for the Study of Crime, Security and Law, Department o...
I am delighted to be returning to Leiden University on 17 April to present my paper 'What is freedom for? A relational approach to liberal personhood'. I argue that a relational definition of persons doesn't necessarily spell the end of liberalism. More here www.universiteitleiden.nl/en/events/20...
27.03.2025 09:13 β π 3 π 0 π¬ 0 π 0
Criminal Justice Theory Blog
Accessible, Interesting, Excellent
In our next post, @marthe.bsky.social (Max Planck, Freiburg) argues that the wrongfulness of image-based sexual abuse lies in its infringement of personhood, and this infringement is better captured using a relational definition of persons. Coming this Friday: criminaljusticetheoryblog.wordpress.com
26.03.2025 08:27 β π 3 π 2 π¬ 0 π 2
Mostly Edinburgh history, tenement life stories and the like. Current project - Tenement Town; Previous project - Small Town Noir.
Postdoctoral Fellow at Amsterdam Law School (ACIL & SGEL) | Previously Melbourne Law School and SOAS | Editor JRHRE | https://www.uva.nl/profile/t.s.f.lindgren
International law, peoples' tribunals, colonialism, climate change, territory and 'place'.
GLIDE postdoctoral fellow at the Ethox Centre, University of Oxford. Bioethicist.
Prof of Law & Regulation of AI at @ox.ac.uk (Faculty of Law & Institute for Ethics in AI). Fellow @reubencollege.bsky.social. Book: "The Privacy Fallacy" (2023). Likes tech, dogs, and sustainable industrial policy
Associate Professor and Member Law Faculty @University of Oxford; lawyer and anthropologist; writes on US-China, Global China, law, culture, international business, and social justice; https://www.matthewserie.com/
News from the Faculty of Law at the University of Oxford
Associate Prof at LSE Law School. Fellow of Oxford Institute of European and Comparative Law. Football and law.
Professor of Law and Philosophy, Oxford
Media Psych PhD student | Therapist in Denver| Interested in cooperatives| Newish to Phish
Associate Professor of Jurisprudence, University of Helsinki. Animal law, legal philosophy, rights, legal personhood etc. Director, Helsinki Animal Law Centre
Estonian human rights lawyer. Illustrator. Currently at the Office of the Estonian Chancellor of Justice as the Head of NHRI Activities. PhD from the European University Institute, LLM from Georgetown Law.
SRHR, obstetric violence, design +human rights.
Lecturer at Swansea University HRC School of Law. US qualified lawyer, former public defender. Mostly posting ICL, IHRL, human rights, fair trials, presumption of innocence. she/her
(she/they)
feminist philosopher in the making // uni freiburg
PhD Researcher in International Law at the Geneva Graduate Institute
Assist. Prof. of Technology and Governance @ethz.ch Β¦ PI @curateproject.bsky.social Β¦ Editor-in-chief @jird-jour.bsky.social
https://matthiasleese.com
Director of Bullard Center Texas Southern University, professor, author of 18 books, NBEJN #HBCU Climate Change Consortium, #ClimateReality Board, AAAS, National Academy of Medicine, TIME Earth Award, Father of Environmental Justice, US Marine Corps Vet.
Criminal Justice Theory Blog, eds. Dr Liat Levanon (KCL) &
@markedsouza1.bsky.social (UCL). We welcome pitches for blogposts on any aspect of crim justice theory.
criminaljusticetheoryblog.wordpress.com
Longtime podcaster, science communicator, ex-birdbrain researcher, curious person trying to be kind & spread joy.
This Week in Science podcast (TWIS.org)
Founder Associationofsciencecommunicators.org
Signal: If you know me, find me there. Let's talk.
Technology is wonderful, let's make it trustworthy too. Chief Information Officer, University of Toronto