open Audacity with a specific mp3 file and a specific label

Audio software developers forum.

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

open Audacity with a specific mp3 file and a specific label

Permanent link to this post Posted by chanash » Thu Dec 29, 2016 3:32 pm

I would like to open Audacity with a specific mp3 file and a specific label file (txt file). How can I do this from the command line?
If it is not possible? How can I format a minimal project xml file to include these two files?
Background story:
I would like to process an audio file in python and use Audiocy as a viewer where my algorithm marked segments and output these into a text file.

Thanks!

Hanan.
chanash
 
Posts: 3
Joined: Thu Dec 29, 2016 3:29 pm
Operating System: Windows 10

Re: open Audacity with a specific mp3 file and a specific la

Permanent link to this post Posted by steve » Fri Dec 30, 2016 2:47 am

I don't think that Audacity will be suitable for your requirements.

You can launch Audacity from the command line and automatically open a project, or import an audio file with this syntax:
Code: Select all
audacity "name of file or project"


This only works with projects and audio files, it does not support importing labels.

Note that when an audio file is imported, it is not the original audio file that you see in the Audacity project, but a copy of the audio data. If you import an MP3 into Audacity and then modify the MP3, the Audacity project will not be updated.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45366
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: open Audacity with a specific mp3 file and a specific la

Permanent link to this post Posted by Edgar » Fri Dec 30, 2016 4:34 pm

chanash wrote:I would like to open Audacity with a specific mp3 file and a specific label file (txt file).

Audacity uses files with the extension ".txt" (text files) for more than one purpose. You would need to use a new extension (".label"?) and then teach Audacity to recognize those files as label files. It should then be pretty simple to teach Audacity to handle the new file type when it sees it on the command line. It would be trivial to make Audacity use the new extension (instead of ".txt") when it outputs a label file.
-Edgar
compiling Audacity daily
64-bit Windows 7
Edgar
Forum Crew
 
Posts: 1490
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 7

Re: open Audacity with a specific mp3 file and a specific la

Permanent link to this post Posted by chanash » Sun Jan 01, 2017 7:38 am

How can I make a minimal project file to include both the labels and the audio mp3 in the same channel?
chanash
 
Posts: 3
Joined: Thu Dec 29, 2016 3:29 pm
Operating System: Windows 10

Re: open Audacity with a specific mp3 file and a specific la

Permanent link to this post Posted by Gale Andrews » Sun Jan 01, 2017 1:07 pm

chanash wrote:How can I make a minimal project file to include both the labels and the audio mp3 in the same channel?

Obviously you can create such a project manually in the Audacity GUI then save it.

*If* the actual MP3 file and label text file never change, then opening that project from the command-line is the same as importing the MP3 file and and the labels file at the command-line (you can't import label tracks using the command-line). Note that the Audacity GUI would open. Do you want that to happen? What is the end purpose of what you are trying to do?

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10


Return to General Audio Programming



Who is online

Users browsing this forum: No registered users and 3 guests