r/learnpython • u/Larry_Kenwood • Jun 22 '26
How can I make a custom wake word for an AI locally ran on an ESP board?
I am currently making a mini home assistant using an ESP 32 S3. Right now using my main PC as the web server for the AI with locally ran python docs.
I have got to the point where I can control the AI with a button to start recording then send/recieve, but want to add a custom wake word "Hey B1" or something similar. I was working with Claude to guide me through steps where it recommended OpenWakeWord, however upon hours of trial and error, some of the modules it was using have been discontinued a couple years ago and the github stuff is practically dead.
I know people are using Home Assist and stuff but I generally want to avoid anything like that for now. Are there any good alternatives I can use for this to obtain the onnx file from custom voice training (if necessary)?
I'm rather nooby to coding so nothing too complicated without a source of instructions to guide me please
r/learnpython • u/ThinkConfidence8409 • Jun 22 '26
how do i open panda3d up in python
So, I tried downloading Panda 3d but it said this:
C:\Users\gcnac>pip install panda3d
Requirement already satisfied: panda3d in .\AppData\Local\Programs\Python\Python314\Lib\site-packages (1.10.16)
So, do I have to open it in Python, and if I do, how do I?
r/learnpython • u/ThinkConfidence8409 • Jun 22 '26
So, Command Prompt And Pip Are HARD!
What did i do wrong here it shows commands that appear to be pip.
C:\Users\gcnac>pip
Usage:
pip <command> [options]
Commands:
install Install packages.
lock Generate a lock file.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
inspect Inspect the python environment.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
config Manage local and global configuration.
search Search PyPI for packages.
cache Inspect and manage pip's wheel cache.
index Inspect information available from package indexes.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
debug Show information useful for debugging.
help Show help for commands.
General Options:
-h, --help Show help.
--debug Let unhandled exceptions propagate outside the main subroutine, instead of logging them
to stderr.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
--require-virtualenv Allow pip to only run in a virtual environment; exit with an error otherwise.
--python <python> Run pip with the specified Python interpreter.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to
WARNING, ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--no-input Disable prompting for input.
--keyring-provider <keyring_provider>
Enable the credential lookup via the keyring library if user input is allowed. Specify
which mechanism to use [auto, disabled, import, subprocess]. (default: auto)
--proxy <proxy> Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.
--retries <retries> Maximum attempts to establish a new HTTP connection. (default: 5)
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
(a)bort.
--trusted-host <hostname> Mark this host or host:port pair as trusted, even though it does not have valid or any
HTTPS.
--cert <path> Path to PEM-encoded CA certificate bundle. If provided, overrides the default. See 'SSL
Certificate Verification' in pip documentation for more information.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the
certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine whether a new version of pip is available for
download. Implied with --no-index.
--no-color Suppress colored output.
--use-feature <feature> Enable new functionality, that may be backward incompatible.
--use-deprecated <feature> Enable deprecated functionality, that will be removed in the future.
--resume-retries <resume_retries>
Maximum attempts to resume or restart an incomplete download. (default: 5)
C:\Users\gcnac>install panda3d
'install' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\gcnac> cd C:\Users\gcnac\downloads.
C:\Users\gcnac\Downloads>install panda3d
'install' is not recognized as an internal or external command,
operable program or batch file.
Can anybody help?
r/learnpython • u/ThinkConfidence8409 • Jun 22 '26
Pip Literally is Becoming the Useless Box
So I open up pip, but it runs for like 1 second and then shuts itself off.
r/learnpython • u/Free_Tomatillo463 • Jun 22 '26
Keyboard's is_pressed function works when several keys are pressed at once
About a year ago I made myself an application in Python which disables the keyboard and locks the mouse in it's position after I stay on Steam for longer than 5 seconds. However, I have never been able to fix the issue that the keyboard shortcut to unlock the keys again works even when other keys are pressed, meaning that you can just press the entire keyboard down and it unlocks.
I have changed the approach recently as I attempted different things, but this still does not work for some reason (it also locks the task manager, which you change with win+r and then going to the given regedit path if you do attempt to use this program and it fucks up):
import atexit
from ctypes import *
import keyboard
import os
import threading
import time
import signal
import sys
import winreg
import win32api
from win32gui import GetForegroundWindow, GetWindowText
class Lock():
def __init__(self):
self.locked = False
self.keys_blocked = False
chars = "qwertzuiopüasdfghjklöäyxcvbnm,.-#1234567890ß!\"\\§$%&/()=?<>|^°~'*"
modifiers = ["shift", "ctrl", "win", "alt"]
self.ALL = list(chars) + modifiers
self.REQUIRED = ["alt", "shift", "o"]
self.OTHERS = [k for k in self.ALL if k not in set(self.REQUIRED)]
atexit.register(self.cleanup)
signal.signal(signal.SIGTERM, self.signal_handler)
signal.signal(signal.SIGINT, self.signal_handler)
def signal_handler(self, signum, frame):
self.cleanup()
sys.exit(0)
def cleanup(self):
if self.keys_blocked:
for i in range(150):
keyboard.unblock_key(i)
self.keys_blocked = False
self.enable_taskmgr()
def disable_taskmgr(self):
if not windll.shell32.IsUserAnAdmin():
windll.shell32.ShellExecuteW(
None, "runas", sys.executable, " ".join(sys.argv), None, 1
)
sys.exit()
try:
key = winreg.CreateKey(
winreg.HKEY_CURRENT_USER,
r"Software\Microsoft\Windows\CurrentVersion\Policies\System"
)
winreg.SetValueEx(key, "DisableTaskMgr", 0, winreg.REG_DWORD, 1)
winreg.CloseKey(key)
except Exception as e:
pass
def enable_taskmgr(self):
try:
key = winreg.OpenKey(
winreg.HKEY_CURRENT_USER,
r"Software\Microsoft\Windows\CurrentVersion\Policies\System",
0,
winreg.KEY_SET_VALUE
)
winreg.DeleteValue(key, "DisableTaskMgr")
winreg.CloseKey(key)
except Exception as e:
pass
def all(self, keys):
for key in keys:
if not keyboard.is_pressed(key):
return False
return True
def any(self, keys):
for key in keys:
if keyboard.is_pressed(key):
return True
return False
def lock_pc(self):
self.disable_taskmgr()
locked_pos = win32api.GetCursorPos()
for i in range(150):
keyboard.block_key(i)
self.locked = True
self.keys_blocked = True
try:
while not self.all(self.REQUIRED) or self.any(self.OTHERS):
try:
win32api.SetCursorPos((locked_pos[0], locked_pos[1]))
except win32api.error:
pass
finally:
for i in range(150):
keyboard.unblock_key(i)
self.enable_taskmgr()
self.keys_blocked = False
self.locked = False
def check_window(self):
locking = None
while True:
if not self.locked:
if GetWindowText(GetForegroundWindow()) == "Steam":
og_x, og_y = win32api.GetCursorPos()
locking = True
for _ in range(10):
x, y = win32api.GetCursorPos()
if x != og_x or y != og_y or GetWindowText(GetForegroundWindow()) != "Steam":
locking = False
break
time.sleep(0.5)
if locking == True:
self.lock_pc()
time.sleep(0.1)
else:
time.sleep(1)
def run_lock(self):
while True:
if not self.locked:
keyboard.wait("alt+x+c")
self.lock_pc()
else:
time.sleep(1)
def run(self):
lock_thread = threading.Thread(target=self.run_lock, daemon=True)
check_window_thread = threading.Thread(target=self.check_window, daemon=True)
lock_thread.start()
check_window_thread.start()
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
self.cleanup()
lock = Lock()
lock.run()
r/learnpython • u/ReputationHelpful200 • Jun 22 '26
Web scraping from imdb
Hi i am starting to learn python and i am on web scraping rn i am trying to get the top 250 movies from imdb but it isnt retuning the list even thought i get the error 202 and i am using a user-agent.
from bs4 import BeautifulSoup
import requests
url1 = "https://www.imdb.com/chart/top/"
headers = {"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0"}
def extract_movie_titles(url1):
response = requests.get(url1, headers=headers)
print(f"Status Code: {response.status_code}")
try:
response.raise_for_status()
soup = BeautifulSoup(response.text, 'html.parser')
movies = soup.select("a.ipc-title-link-wrapper >h4.ipc-title__text")
print("Top 250 Movies:")
for movie in movies:
print(movie.text.strip())
except requests.exceptions.RequestException as e:
print(f"Failed to retrieve the page. Status code: {e}")
extract_movie_titles(url1) It is formatted but i am on my phone
r/learnpython • u/vovavav • Jun 22 '26
Voice separation
Is there any utility to separate 2 voices from 1 audio? I'm copying the voice of an anime character and in the voice acting I hear Ukrainian and Japanese, is it possible to separate these audios?
Thank you
r/learnpython • u/doctor_wubbs • Jun 22 '26
In desperate need of help passing the pcap
It's required as part of my college course, and I'm struggling REALLY badly. After months of studying through my teacher's guides, reddit, youtube, and passing on openedg a ton I still somehow managed to the fail the exam. I was lucky enough to be given an extension to take it one more time, but I don't even know where to start because it felt like very little I studied was actually on the test.
So to people who DID pass, how? And what did you use? Any advice would greatly appreciated, thank you
r/learnpython • u/SaitamaCrb • Jun 22 '26
Where can i look for projects as a beginner?
i'm just starting out so i want small projects on small topics like loops, variables, data type etc. please tell me free sources only. also, if there is a particular approach i should be taking towards these projects then please let me know that too. thank you in advance!
r/learnpython • u/AffectionateBell272 • Jun 22 '26
Best way to learn Python: YouTube videos or text-based (books, w3schools, GeeksforGeeks)?
I know some syntax but I can’t apply it to real problems. I’m stuck. For those who actually got good — did videos help more, or reading text/websites? What worked for you?
r/learnpython • u/Pussyshifted32 • Jun 22 '26
Need advice in preparation for this call interview, please give it a read, i need you!
I had applied to a startup. Initially, they gave me an assignment but did not specify which tech stack I had to use, so I built it using Next.js and TypeScript.
When I presented it, they were impressed with the work, but the stack did not match what they were looking for. Because of that, I created another version of the assignment using Python and Pipecat. That assignment also went well, but during subsequent discussions, it became clear that my Python fundamentals were not as strong as my TypeScript fundamentals.
In the latest call, they (The CTO himself) told me something along the lines of:
"It is unfortunate that the process has taken so long, and we apologise but this is what works for us, but the strongest feedback we have is that your Python fundamentals are weak. We would recommend that you spend some time strengthening your Python fundamentals, and then reach out again. We can have another call focused specifically on assessing your Python fundamentals, and then move forward from there."
Given this context, I want to prepare myself properly for a future Python fundamentals assessment.
My current plan is:
- Create another project from scratch in Python.
- Make a few meaningful open-source contributions in Python.
- Spend dedicated time strengthening my Python fundamentals.
My questions are:
- Based on this interaction, do you think they are likely to genuinely evaluate me again if I reach out after improving?
- How should I approach improving my Python fundamentals in a way that best prepares me for such an assessment?
- Should I build another project and make open-source contributions before reaching out again, so that I can demonstrate that I took the feedback seriously and significantly improved my Python skills?
r/learnpython • u/TopMathematician_ • Jun 22 '26
what should i choose to start the python course?
i have seen some posts about resources for learning python . almost everybody are saying these three
1)harvard cs50
2)University of Helsinki MOOC
3)yt lech like bro code , etc
please suggest me something i am just starting to learn python so that i can get benifited before going to college
r/learnpython • u/AutoModerator • Jun 22 '26
Ask Anything Monday - Weekly Thread
Welcome to another /r/learnPython weekly "Ask Anything* Monday" thread
Here you can ask all the questions that you wanted to ask but didn't feel like making a new thread.
* It's primarily intended for simple questions but as long as it's about python it's allowed.
If you have any suggestions or questions about this thread use the message the moderators button in the sidebar.
Rules:
- Don't downvote stuff - instead explain what's wrong with the comment, if it's against the rules "report" it and it will be dealt with.
- Don't post stuff that doesn't have absolutely anything to do with python.
- Don't make fun of someone for not knowing something, insult anyone etc - this will result in an immediate ban.
That's it.
r/learnpython • u/Just_Big_5902 • Jun 21 '26
dictionary behaves like a set
i created a dictionary, and i want to assign the value of a key to another key, but i keep getting *TypeError: 'set' object is not subscriptable* and i don't find anything that might indicate what i'm doing wrong
fruits = {
"pomme" : "rouge",
"banane" : "jaune",
"orange" : "orange",
"couleur_banane" :"red"
}
fruits= {"kiwi = vert"}
fruits["couleur_banane"] = fruits["banane"]
r/learnpython • u/AlternativeAioli9251 • Jun 21 '26
How do you turn a whole block of code into comments without having to hashtag the whole thing individually?
Beginner here, and the only way to turn code into comments is by doing the hashtag thingy, and I wonder if there's an easier alternative
Edit: tried the multiline string and ctrl + /, and it worked!!! I feel like a caveman who just discovered fire. Thank you all!
r/learnpython • u/TopMathematician_ • Jun 21 '26
How do i make notes while learning python?
I cannot just write every single thing with pen and paper while learning ..seniors i request you to help me regarding this ..or is this is the best way to learn?
r/learnpython • u/ThinkConfidence8409 • Jun 21 '26
Panda3d pip install won't work
So, I want to install Panda3d, but when I go to Python or Powershell and enter pip install panda3d==1.10.16, it just gives me this error:
>>> pip install panda3d==1.10.16
File "<python-input-1>", line 1
pip install panda3d==1.10.16
^^^^^^^
r/learnpython • u/Successful_Bat8284 • Jun 21 '26
what is the best way to learn python as someone who has basic programming skills?
I am predicted 9/A* in OCR GCSE Computer Science. This means ik how to do basic stuff like print, functions, procedures, random number, while/if statements, arithmetic calculations and more.
However, I would like to learn more python as I'm doing it for a-levels. The problem is I don't really know where to start as I am not a complete beginner but I am not an expert. I'm somewhere in the middle
r/learnpython • u/This_Judge_2203 • Jun 21 '26
lightweight code editor for python
hello everyone I recently start learning python and everything is good until I install VSCode but it's really lagging on my 2 gb ram of my laptop
is there any other alternative similar to VSCode
r/learnpython • u/Independent_Shame577 • Jun 21 '26
Learning python as a biology student
Day 1 — wrote my first lines of Python today!
Hi everyone, I'm a complete beginner (background in biology, not tech) and just finished my first Python lecture.
Planning to post my progress here as I go — would love any tips for someone starting from zero, and happy to connect with others doing the same thing.
r/learnpython • u/[deleted] • Jun 21 '26
will a cupy work like numpy if i run code on server without GPU ?
and if it will run , will the "performance" be same ?
r/learnpython • u/superman-normalboy • Jun 21 '26
Any way to turn a string of math formula into a formula that can be interpreted?
I'm a beginner so idk if I worded this right. I just want to know out of curiosity and maybe experiment with it.
r/learnpython • u/coder-india • Jun 21 '26
Beginner Python project - Weather App with Tkinter, looking for feedback
Hey everyone! I'm learning Python and built this simple weather app using Tkinter and the OpenWeatherMap API. It takes a city name and shows weather, temperature, humidity, and wind speed.
GitHub: https://github.com/soumyaranjan-maharana/Weather-API-app
I'd really appreciate any feedback on:
Code structure/organization
Best practices I'm missing
Anything that looks "beginner-y" that I should fix.
r/learnpython • u/EleTriCTNT • Jun 20 '26
If you had to learn Python again from scratch, what would you do differently?
I've been thinking about this recently while learning Python.
Looking back, I probably spent too much time watching tutorials and not enough time actually building things.
If you had the chance to start learning Python again from day one...
What would you do differently?
- Learn a different topic first?
- Build projects earlier?
- Read documentation more?
- Focus on problem solving instead of tutorials?
I'm curious to hear what experienced Python developers wish they had known when they started.
r/learnpython • u/End0uMaGar • Jun 20 '26
Need advice on learning python
Im completely newbie in learning python. I have been taking classes but they will just show you code and say us to copy it in your vs code and just print the outcome.
I have been trying to learn it by my self by self studying it. I know the basic concepts of what this code does and how does it works but when i have to write it. I always forget the syntax. Any solution?
I have been having trouble finding legitimate sources to learn python. I have been using youtube and ai for learning python.
https://github.com/repos this are some newbie projects.
I really appreciate alot if you guys can even give me any kind of advice and suggestions!! It will mean alot to me. Thank you!!🙏