Re: Automatic Gain Control in Python?
On 2022-06-01 03:01, Steve GS wrote: > I started but major issues prevented me this weekend (New Roof, Major limb > broke for pine tree... > I still have to install pyAudio. PyPI has wheels only up to Python 3.6, but Christoph Gohlke's site has ones for more recent versions: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio > -Original Message- > From: Python-list On > Behalf Of MRAB > Sent: Tuesday, May 31, 2022 9:47 PM > To: python-list@python.org > Subject: Re: Automatic Gain Control in Python? > > On 2022-06-01 02:03, Steve GS wrote: > [snip] > > > Maybe you do not understand smart speakers. That is exactly what they do. > > You tell them what podcast/broadcast to play, they get it and play it > > for you. It is that simple. > > > > All I want to do is change the audio levels automatically to make it > > easier on the ear. > > > Did you have a look at the code I posted? > > I've found that pyaudio can listen to the Line In input at the same time as > Audacity is recording from it, so you could might be able to use it to > monitor the level and then tell the smart speaker to turn the volume up or > down. -- https://mail.python.org/mailman/listinfo/python-list
RE: Automatic Gain Control in Python?
I started but major issues prevented me this weekend (New Roof, Major limb broke for pine tree... I still have to install pyAudio. Genie: You have three wishes. Me: I wish I had more wishes. Genie: You cannot wish for more wishes. Me: I wish I could. -Original Message- From: Python-list On Behalf Of MRAB Sent: Tuesday, May 31, 2022 9:47 PM To: python-list@python.org Subject: Re: Automatic Gain Control in Python? On 2022-06-01 02:03, Steve GS wrote: [snip] > Maybe you do not understand smart speakers. That is exactly what they do. > You tell them what podcast/broadcast to play, they get it and play it > for you. It is that simple. > > All I want to do is change the audio levels automatically to make it > easier on the ear. > Did you have a look at the code I posted? I've found that pyaudio can listen to the Line In input at the same time as Audacity is recording from it, so you could might be able to use it to monitor the level and then tell the smart speaker to turn the volume up or down. -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Automatic Gain Control in Python?
On 2022-06-01 02:03, Steve GS wrote: [snip] Maybe you do not understand smart speakers. That is exactly what they do. You tell them what podcast/broadcast to play, they get it and play it for you. It is that simple. All I want to do is change the audio levels automatically to make it easier on the ear. Did you have a look at the code I posted? I've found that pyaudio can listen to the Line In input at the same time as Audacity is recording from it, so you could might be able to use it to monitor the level and then tell the smart speaker to turn the volume up or down. -- https://mail.python.org/mailman/listinfo/python-list
Re: Automatic Gain Control in Python?
On Wed, 1 Jun 2022 at 11:05, Steve GS wrote: > > > >Even easier, the few NPR podcasts I just checked now have RSS feeds of > their episodes (as expected). It seems it would be much easier to just > download the latest episode based on the XML file, normalize, send it to > play, done. > > How can that possibly be easier? I am playing the podcast and recording it > for a one-time replay. > Now you want me to write a program that automatically downloads 48 files > then manipulate them for equalization then replay it. It certainly doesn't > sound easier to me. I already have that working using simple > computer-generated vocal commands. > General principle: If you're asking someone else for help, don't tell them that your way is easier, because the obvious response is "go ahead then, do it your own way". You're technically right in a sense: something that you already have is, indeed, easier than something else. But downloading files is *easy* in Python, and audio analysis on files is FAR easier than real-time audio analysis with hysteresis avoidance. What you're doing actually reminds me of the old acoustic couplers [1], which were a messy hack brought about by monopolies that refused to allow other devices onto the network. Unless you have a really good reason for sticking to the black-box system, I would strongly recommend going for the much much easier method of simply downloading the files as they are. ChrisA [1] https://en.wikipedia.org/wiki/Acoustic_coupler -- https://mail.python.org/mailman/listinfo/python-list
RE: Automatic Gain Control in Python?
>Even easier, the few NPR podcasts I just checked now have RSS feeds of their episodes (as expected). It seems it would be much easier to just download the latest episode based on the XML file, normalize, send it to play, done. How can that possibly be easier? I am playing the podcast and recording it for a one-time replay. Now you want me to write a program that automatically downloads 48 files then manipulate them for equalization then replay it. It certainly doesn't sound easier to me. I already have that working using simple computer-generated vocal commands. > Why is it so crucial that it be done "in real time", which it really isn't, unless you are listening to the live NPR feed. In the case of podcasts, *why* would you possible play them via streaming instead of downloading the publicly accessible file to manipulate however you chose? It is played "real time" and yes, for the listeners in the community, it is real time no matter when it was recorded. >> The code is to: Listen to the audio level for about 10 seconds or so >> and raise or lower the level in small increments. >Based on what? A simple sample rate. > Do you want a 10 second buffer to continually be analyzed in real time? >From the output of a speaker, no less? Why should the source be of any concern? It is much more than a speaker. It is pulling in the podcasts/broadcasts and playing them. The audio is also being sent to a computer through an aux-out cable. Why is that confusing? > And which level? Peak? Average over...10 seconds? Are you keeping track of the previous values to make it match? That is what correlation is all about. >Where is that stored? In the computer that is running the AGC. >> It has nothing to do with understanding how to grab podcasts. The >> system is working very well for that. OK...then perhaps I/we am/are confused on the limitations of the program. What does it "grab", *exactly*? Maybe you do not understand smart speakers. That is exactly what they do. You tell them what podcast/broadcast to play, they get it and play it for you. It is that simple. All I want to do is change the audio levels automatically to make it easier on the ear. -- AH#61 Wolf#14 BS#89 bus#1 CCB#1 SENS KOTC#4 ph...@philb.ca http://philb.ca -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On Tue, 31 May 2022, MRAB wrote: The note could be displayed partially in the column itself, with the full text displayed either in read-only textbox nearby when the row is selected (and it's the only selected row), or in the form of a tooltip when you hover over it. There's an example of how to show a tooltip here: https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter MRAB, Thank you very much. I've been reading about the TreeView and learning how to use it. Displaying the text column in a read-only textbox or tooltip would certainly do the job. Best regards, Rich -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On 2022-05-31 21:29, Rich Shepard wrote: On Tue, 31 May 2022, MRAB wrote: Have a look at the tkinter.ttk.Treeview widget; it can be formatted as a tree hierarchy, its name suggests, or a multi-column tables, but it doesn't support multi-line text though, as far as I know. MRAB, Thank you, I will. Each time I add a row to the contacts database table I include a note of what was discussed and what needs to be done. I'd like to be able to see the entire note with each contact event. I'm not committed to using a table so I'm totally open to other approaches. My needs are few: - The returned results are read-only. - The number of rows returned are variable. - Each row has a contact date, contact type, note, and next contact date. The last one isn't necessary to be displayed, but the first three are. - I want to be able to scroll and view all returned rows. The note could be displayed partially in the column itself, with the full text displayed either in read-only textbox nearby when the row is selected (and it's the only selected row), or in the form of a tooltip when you hover over it. There's an example of how to show a tooltip here: https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter As with the tkinter.Text widget, you'll need to add the scrollbar(s) separately and then link them. This I expected. -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On Tue, 31 May 2022, MRAB wrote: Have a look at the tkinter.ttk.Treeview widget; it can be formatted as a tree hierarchy, its name suggests, or a multi-column tables, but it doesn't support multi-line text though, as far as I know. MRAB, Thank you, I will. Each time I add a row to the contacts database table I include a note of what was discussed and what needs to be done. I'd like to be able to see the entire note with each contact event. I'm not committed to using a table so I'm totally open to other approaches. My needs are few: - The returned results are read-only. - The number of rows returned are variable. - Each row has a contact date, contact type, note, and next contact date. The last one isn't necessary to be displayed, but the first three are. - I want to be able to scroll and view all returned rows. As with the tkinter.Text widget, you'll need to add the scrollbar(s) separately and then link them. This I expected. Thanks, Rich -- https://mail.python.org/mailman/listinfo/python-list
Re: Tkinter: multicolumn table widget
On 2022-05-31 19:47, Rich Shepard wrote: My web searches haven't helped me learn how to design a read-only scrollable table widget displaying rows retrieved from postgres database tables. This is for my business development application. I'm writing a view module that displays my contact history with a named person. The person's last and first name are passed to the database tables and all the results are displayed in a read-only view. The view has three vertical sections: person information on top, contact methods (phones, email) below that, and a scrollable, multicolumn table at the bottom. The table columns consist of three tk.StringVal() and one tk.Text() which usually has multiple rows related to that contact event. I want to learn how to create the table so each row has the contents of each of the four columns and I can scroll down and up to look at the history. All help is certainly appreciated. Have a look at the tkinter.ttk.Treeview widget; it can be formatted as a tree hierarchy, its name suggests, or a multi-column tables, but it doesn't support multi-line text though, as far as I know. As with the tkinter.Text widget, you'll need to add the scrollbar(s) separately and then link them. -- https://mail.python.org/mailman/listinfo/python-list
Re: Problems with Python
On 01/06/2022 00.00, Howard Samuels via Python-list wrote: > Good day > I am new to programming. I have signed up for a virtual online course and > installed Python using Anaconda as well as jupyter notebook. I encountered > problems & then went to YouTube tried going directly to the python website > and used Pycharm. When I used pycharm and try to run the first basic program > I am getting a message that it is unable to load the Virtual environment. > Also a message that ??the SDK seem to be false??? or some like wording. I > went to google which gave me stock overflow. I am confused there as some of > the responses I see there suppose that I am into programming and understand a > lot of these terms. Some things I see, I understand but none of those have > made a difference. One such is to type "pip install virtenv" The system > states that the requirement is already satisfied. > In the process of trying to uninstall & reinstall and saw the invitation to > write seeking for help. I therefore cannot immediately reproduce the error > message.Can you help? So many 'moving parts' and unnecessarily-advanced features are described here. No wonder your head is spinning! Which course? How does *it* recommend setting-up the Python environment? Failing that, start PyCharm, open a new project, open a new Python file, type: a = 2 + 2 print( a ) and use the PyCharm command to "run". Build from there, one step at a time! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list
Re: Automatic Gain Control in Python?
Richard Damon wrote: > From your description, your fundamental problem is you are trying to > automatically "control" things that weren't designed to be automatically > controlled in the way you are attempting. > What you seem to be missing is that you could get the podcasts from a > browser, and all a browser is is a program. It isn't that much work to > write a rudimentary browser in python, especially if you don't actually > need to display the results to a user, but are only trying to automate a > particular task. Even easier, the few NPR podcasts I just checked now have RSS feeds of their episodes (as expected). It seems it would be much easier to just download the latest episode based on the XML file, normalize, send it to play, done. Why is it so crucial that it be done "in real time", which it really isn't, unless you are listening to the live NPR feed. In the case of podcasts, *why* would you possible play them via streaming instead of downloading the publicly accessible file to manipulate however you chose? > SteveGS wrote: >> The code is to: Listen to the audio level for about 10 seconds or >> so and raise or lower the level in small increments. Based on what? Do you want a 10 second buffer to continually be analyzed in real time? From the output of a speaker, no less? And which level? Peak? Average over...10 seconds? Are you keeping track of the previous values to make it match? Where is that stored? >> It has nothing to do with understanding how to grab podcasts. The >> system is working very well for that. OK...then perhaps I/we am/are confused on the limitations of the program. What does it "grab", *exactly*? Phil -- AH#61 Wolf#14 BS#89 bus#1 CCB#1 SENS KOTC#4 ph...@philb.ca http://philb.ca -- https://mail.python.org/mailman/listinfo/python-list
Tkinter: multicolumn table widget
My web searches haven't helped me learn how to design a read-only scrollable table widget displaying rows retrieved from postgres database tables. This is for my business development application. I'm writing a view module that displays my contact history with a named person. The person's last and first name are passed to the database tables and all the results are displayed in a read-only view. The view has three vertical sections: person information on top, contact methods (phones, email) below that, and a scrollable, multicolumn table at the bottom. The table columns consist of three tk.StringVal() and one tk.Text() which usually has multiple rows related to that contact event. I want to learn how to create the table so each row has the contents of each of the four columns and I can scroll down and up to look at the history. All help is certainly appreciated. Rich -- https://mail.python.org/mailman/listinfo/python-list
Re: Problems with Python
Good day I am new to programming. I have signed up for a virtual online course and installed Python using Anaconda as well as jupyter notebook. I encountered problems & then went to YouTube tried going directly to the python website and used Pycharm. When I used pycharm and try to run the first basic program I am getting a message that it is unable to load the Virtual environment. Also a message that ??the SDK seem to be false??? or some like wording. I went to google which gave me stock overflow. I am confused there as some of the responses I see there suppose that I am into programming and understand a lot of these terms. Some things I see, I understand but none of those have made a difference. One such is to type "pip install virtenv" The system states that the requirement is already satisfied. In the process of trying to uninstall & reinstall and saw the invitation to write seeking for help. I therefore cannot immediately reproduce the error message.Can you help? Howard Samuels Are You Ready for Jesus to Come? On Tuesday, May 31, 2022, 07:54:58 AM GMT-4, Howard Samuels wrote: Good day I am new to programming. I have signed up for a virtual online course and installed Python using Anaconda as well as jupyter notebook. I encountered problems & then went to YouTube tried going directly to the python website and used Pycharm. When I used pycharm and try to run the first basic program I am getting a message that it is unable to load the Virtual environment. Also a message that ??the SDK seem to be false??? or some like wording. I went to google which gave me stock overflow. I am confused there as some of the responses I see there suppose that I am into programming and understand a lot of these terms. Some things I see, I understand but none of those have made a difference. One such is to type "pip install virtenv" The system states that the requirement is already satisfied. In the process of trying to uninstall & reinstall and saw the invitation to write seeking for help. I therefore cannot immediately reproduce the error message.Can you help? Howard Samuels Are You Ready for Jesus to Come? -- https://mail.python.org/mailman/listinfo/python-list
[Python-announce] [RELEASE] The second Python 3.11 beta (3.11.0b2) is available
Does anyone want bug fixes? Because we have 164 new commits fixing different things, from code to documentation. If you have reported some issue after 3.11.0b1, you should check if is fixed and if not, make sure you tell us so we can take a look. We still have two more betas to go so help us to make sure we don't miss anything so everything is ready for the final release!! https://www.python.org/downloads/release/python-3110b2/ ## This is a beta preview of Python 3.11 Python 3.11 is still in development. 3.11.0b2 is the second of four planned beta release previews. Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their projects to support the new feature release. We **strongly encourage** maintainers of third-party Python projects to **test with 3.11** during the beta phase and report issues found to [the Python bug tracker](https://github.com/python/cpython/issues) as soon as possible. While the release is planned to be feature complete entering the beta phase, it is possible that features may be modified or, in rare cases, deleted up until the start of the release candidate phase (Monday, 2021-08-02). Our goal is to have no ABI changes after beta 4 and as few code changes as possible after 3.11.0rc1, the first release candidate. To achieve that, it will be **extremely important** to get as much exposure for 3.11 as possible during the beta phase. Please keep in mind that this is a preview release and its use is **not** recommended for production environments. # Major new features of the 3.11 series, compared to 3.10 Many new features for Python 3.11 are still being planned and written. Among the new major new features and changes so far: * [PEP 657](https://www.python.org/dev/peps/pep-0657/) -- Include Fine-Grained Error Locations in Tracebacks * [PEP 654](https://www.python.org/dev/peps/pep-0654/) -- Exception Groups and except* * [PEP 673](https://www.python.org/dev/peps/pep-0673/) -- Self Type * [PEP 646](https://www.python.org/dev/peps/pep-0646/)-- Variadic Generics * [PEP 680](https://www.python.org/dev/peps/pep-0680/)-- tomllib: Support for Parsing TOML in the Standard Library * [PEP 675](https://www.python.org/dev/peps/pep-0675/)-- Arbitrary Literal String Type * [PEP 655](https://www.python.org/dev/peps/pep-0655/)-- Marking individual TypedDict items as required or potentially-missing * [PEP 681](https://www.python.org/dev/peps/pep-0681/)-- Data Class Transforms * [bpo-46752](https://bugs.python.org/issue46752)-- Introduce task groups to asyncio * [bpo-433030](https://github.com/python/cpython/issues/34627/) -- Atomic grouping ((?>...)) and possessive quantifiers (`*+, ++, ?+, {m,n}+`) are now supported in regular expressions. * The [Faster Cpython Project](https://github.com/faster-cpython/) is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See [Faster CPython]( https://docs.python.org/3.11/whatsnew/3.11.html#faster-cpython) for details. * (Hey, **fellow core developer,** if a feature you find important is missing from this list, [let Pablo know](mailto:pablog...@python.org ).) The next pre-release of Python 3.11 will be 3.11.0b3, currently scheduled for Thursday, 2022-06-16. # More resources * [Online Documentation](https://docs.python.org/3.11/) * [PEP 664](https://www.python.org/dev/peps/pep-0664/), 3.11 Release Schedule * Report bugs at [https://bugs.python.org](https://bugs.python.org). * [Help fund Python and its community](/psf/donations/). # And now for something completely different The Planck time is the time required for light to travel a distance of 1 Planck length in a vacuum, which is a time interval of approximately `5.39*10^(−44)` s. No current physical theory can describe timescales shorter than the Planck time, such as the earliest events after the Big Bang, and it is conjectured that the structure of time breaks down on intervals comparable to the Planck time. While there is currently no known way to measure time intervals on the scale of the Planck time, researchers in 2020 found that the accuracy of an atomic clock is constrained by quantum effects on the order of the Planck time, and for the most precise atomic clocks thus far they calculated that such effects have been ruled out to around `10^−33` s, or 10 orders of magnitude above the Planck scale. # We hope you enjoy the new releases! Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. https://www.python.org/psf/ Regards from sunny London, Pablo Galindo Salgado ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to
[RELEASE] The second Python 3.11 beta (3.11.0b2) is available
Does anyone want bug fixes? Because we have 164 new commits fixing different things, from code to documentation. If you have reported some issue after 3.11.0b1, you should check if is fixed and if not, make sure you tell us so we can take a look. We still have two more betas to go so help us to make sure we don't miss anything so everything is ready for the final release!! https://www.python.org/downloads/release/python-3110b2/ ## This is a beta preview of Python 3.11 Python 3.11 is still in development. 3.11.0b2 is the second of four planned beta release previews. Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their projects to support the new feature release. We **strongly encourage** maintainers of third-party Python projects to **test with 3.11** during the beta phase and report issues found to [the Python bug tracker](https://github.com/python/cpython/issues) as soon as possible. While the release is planned to be feature complete entering the beta phase, it is possible that features may be modified or, in rare cases, deleted up until the start of the release candidate phase (Monday, 2021-08-02). Our goal is to have no ABI changes after beta 4 and as few code changes as possible after 3.11.0rc1, the first release candidate. To achieve that, it will be **extremely important** to get as much exposure for 3.11 as possible during the beta phase. Please keep in mind that this is a preview release and its use is **not** recommended for production environments. # Major new features of the 3.11 series, compared to 3.10 Many new features for Python 3.11 are still being planned and written. Among the new major new features and changes so far: * [PEP 657](https://www.python.org/dev/peps/pep-0657/) -- Include Fine-Grained Error Locations in Tracebacks * [PEP 654](https://www.python.org/dev/peps/pep-0654/) -- Exception Groups and except* * [PEP 673](https://www.python.org/dev/peps/pep-0673/) -- Self Type * [PEP 646](https://www.python.org/dev/peps/pep-0646/)-- Variadic Generics * [PEP 680](https://www.python.org/dev/peps/pep-0680/)-- tomllib: Support for Parsing TOML in the Standard Library * [PEP 675](https://www.python.org/dev/peps/pep-0675/)-- Arbitrary Literal String Type * [PEP 655](https://www.python.org/dev/peps/pep-0655/)-- Marking individual TypedDict items as required or potentially-missing * [PEP 681](https://www.python.org/dev/peps/pep-0681/)-- Data Class Transforms * [bpo-46752](https://bugs.python.org/issue46752)-- Introduce task groups to asyncio * [bpo-433030](https://github.com/python/cpython/issues/34627/) -- Atomic grouping ((?>...)) and possessive quantifiers (`*+, ++, ?+, {m,n}+`) are now supported in regular expressions. * The [Faster Cpython Project](https://github.com/faster-cpython/) is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See [Faster CPython]( https://docs.python.org/3.11/whatsnew/3.11.html#faster-cpython) for details. * (Hey, **fellow core developer,** if a feature you find important is missing from this list, [let Pablo know](mailto:pablog...@python.org ).) The next pre-release of Python 3.11 will be 3.11.0b3, currently scheduled for Thursday, 2022-06-16. # More resources * [Online Documentation](https://docs.python.org/3.11/) * [PEP 664](https://www.python.org/dev/peps/pep-0664/), 3.11 Release Schedule * Report bugs at [https://bugs.python.org](https://bugs.python.org). * [Help fund Python and its community](/psf/donations/). # And now for something completely different The Planck time is the time required for light to travel a distance of 1 Planck length in a vacuum, which is a time interval of approximately `5.39*10^(−44)` s. No current physical theory can describe timescales shorter than the Planck time, such as the earliest events after the Big Bang, and it is conjectured that the structure of time breaks down on intervals comparable to the Planck time. While there is currently no known way to measure time intervals on the scale of the Planck time, researchers in 2020 found that the accuracy of an atomic clock is constrained by quantum effects on the order of the Planck time, and for the most precise atomic clocks thus far they calculated that such effects have been ruled out to around `10^−33` s, or 10 orders of magnitude above the Planck scale. # We hope you enjoy the new releases! Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. https://www.python.org/psf/ Regards from sunny London, Pablo Galindo Salgado -- https://mail.python.org/mailman/listinfo/python-list