How to name channels/tracks in my *.wav files in Python?

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
saurabh02
Posts: 3
Joined: Mon Sep 28, 2020 8:14 pm
Operating System: Windows 10

How to name channels/tracks in my *.wav files in Python?

Post by saurabh02 » Mon Sep 28, 2020 8:47 pm

I am creating and writing `*.wav` files using the `wavefile` Python package (source code on Github [here](https://github.com/vokimon/python-wavefile)). When I open these files in Audacity and display the track/channel names, they have default names of the format `{filename} 1`, `{filename} 2`, `{filename} 3`,... and so on. Is there a way to customize these names in Python using the `wavefile` module, or any other module such that Audacity shows those names?

steve
Site Admin
Posts: 81271
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to name channels/tracks in my *.wav files in Python?

Post by steve » Mon Sep 28, 2020 9:05 pm

saurabh02 wrote:
Mon Sep 28, 2020 8:47 pm
I am creating and writing `*.wav` files using the `wavefile` Python package
...
Is there a way to customize these names in Python
Just change the name of the file that you are writing. If you write the file as "my example.wav", then when you import it into Audacity it will create a track called "my example".

If you need help using the 'wavefile' Python package, you could try asking the author of that package, or one of these forums: https://www.python.org/community/forums/
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

saurabh02
Posts: 3
Joined: Mon Sep 28, 2020 8:14 pm
Operating System: Windows 10

Re: How to name channels/tracks in my *.wav files in Python?

Post by saurabh02 » Mon Sep 28, 2020 9:48 pm

Sorry that doesn't answer my question. I'm looking to edit the channel names, not the file name.

steve
Site Admin
Posts: 81271
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to name channels/tracks in my *.wav files in Python?

Post by steve » Tue Sep 29, 2020 7:26 am

Audacity uses the file name as the name of the track.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

saurabh02
Posts: 3
Joined: Mon Sep 28, 2020 8:14 pm
Operating System: Windows 10

Re: How to name channels/tracks in my *.wav files in Python?

Post by saurabh02 » Tue Sep 29, 2020 12:45 pm

Is there not a way to edit the WAV file in such a way that Audacity reads those custom channel names?

steve
Site Admin
Posts: 81271
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to name channels/tracks in my *.wav files in Python?

Post by steve » Tue Sep 29, 2020 3:58 pm

WAV files don't have channel names.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply