Praat script to export all possible data about audio












1















Maybe someone has the Praat script, which can get all possible information about the Audio file (pitches, formats, intensity)?enter image description here.










share|improve this question



























    1















    Maybe someone has the Praat script, which can get all possible information about the Audio file (pitches, formats, intensity)?enter image description here.










    share|improve this question

























      1












      1








      1


      1






      Maybe someone has the Praat script, which can get all possible information about the Audio file (pitches, formats, intensity)?enter image description here.










      share|improve this question














      Maybe someone has the Praat script, which can get all possible information about the Audio file (pitches, formats, intensity)?enter image description here.







      praat






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 4 '16 at 15:05









      bobah75bobah75

      2,5761919




      2,5761919
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Assuming that by "all possible data about audio" you only mean fundamental frequency, formant structure and intensity contour (and not, say, spectra, pulses, etc), the easiest way to do this is to generate respectively a Pitch, Formant, and Intensity objects.



          pitch     = To Pitch: 0, min_f0, max_f0
          formant = To Formant (burg): 0,
          ... total_formants, max_formant, 0.025, 50
          intensity = To Intensity: min_f0, 0, "yes"


          You'll still need to know some things about the audio you're processing, though, like the likely frequency of the maximum formant you are interested in, or the range within which you estimate the fundamental to be (you might want to look at this plugin with automatic methods for estimating f0 range).



          As for the exporting, what I assume you mean by this is that you want this information to be accessible from a program that is not Praat. This might be the hardest part, since Praat does not have any standard way to export data, and the data formats that it uses, although they are all text-based, are all very ... Praat-specific (you can check them out by using the Save as text file... command).



          You could process them within Praat and put the data you want into a Table object with whatever format and structure you want and save it as either a tab or a comma separated file (see my related answer). To get started, you could use the Down to Table... command available for Formant objects, which will create a Table with the formant data. You can then expand that Table to include data from the Pitch and Intensity objects (or whatever objects you need).



          Alternatively, most (=not all) text-based formats used by Praat are almost YAML, so you could try to convert them and read them as-is into whatever program you want to use later on. I wrote a couple of Perl scripts that do just this, converting to and from JSON/YAML, and a Praat plugin to do this from the Praat GUI. You might want to check those out.






          share|improve this answer


























          • Yes, that's right, I want to get big table with [time][intensity][formants][pitches] any format (xml, csv, txt)

            – bobah75
            Feb 5 '16 at 13:18











          • Can you provide more code? Easily export to table one LongSound file.

            – bobah75
            Feb 5 '16 at 14:01











          • Short of actually writing your script for you, I can't imagine what more code I can provide: I've pointed out the exact commands you need to obtain formant structure, and fundamental frequency and intensity contours; and I've linked to a question with an extensive example of how to put that into a Table. What more code do you want? There's a Down to Table... command for Formant objects that can provide you with a Table to get started; I'll add it to my answer.

            – jja
            Feb 5 '16 at 20:39











          • Thank you, you helped me.

            – bobah75
            Feb 5 '16 at 20:51



















          0














          Here's a script solves the problem.



          form Give the parameters for pause analysis
          comment soundname:
          text soundname 1.wave
          comment outputFileName.csv:
          text outputFileName result.csv
          endform

          min_f0 = 75
          max_f0 = 350

          Read from file: soundname$
          soundname$ = selected$ ("Sound")

          select Sound 'soundname$'
          formant = To Formant (burg): 0, 4, 5000, 0.025, 50
          formantStep = Get time step


          selectObject: formant
          table = Down to Table: "no", "yes", 6, "yes", 3, "yes", 3, "yes"
          numberOfRows = Get number of rows

          select Sound 'soundname$'
          pitch = To Pitch: 0, min_f0, max_f0

          selectObject: table
          Append column: "Pitch"

          for step to numberOfRows
          selectObject: table
          t = Get value: step, "time(s)"

          selectObject: pitch
          pitchValue = Get value at time: t, "Hertz", "Nearest"

          selectObject: table
          Set numeric value: step, "Pitch", pitchValue
          endfor


          #export to csv
          selectObject: table
          Save as comma-separated file: outputFileName$
          removeObject(table)

          echo Ok





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35204509%2fpraat-script-to-export-all-possible-data-about-audio%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Assuming that by "all possible data about audio" you only mean fundamental frequency, formant structure and intensity contour (and not, say, spectra, pulses, etc), the easiest way to do this is to generate respectively a Pitch, Formant, and Intensity objects.



            pitch     = To Pitch: 0, min_f0, max_f0
            formant = To Formant (burg): 0,
            ... total_formants, max_formant, 0.025, 50
            intensity = To Intensity: min_f0, 0, "yes"


            You'll still need to know some things about the audio you're processing, though, like the likely frequency of the maximum formant you are interested in, or the range within which you estimate the fundamental to be (you might want to look at this plugin with automatic methods for estimating f0 range).



            As for the exporting, what I assume you mean by this is that you want this information to be accessible from a program that is not Praat. This might be the hardest part, since Praat does not have any standard way to export data, and the data formats that it uses, although they are all text-based, are all very ... Praat-specific (you can check them out by using the Save as text file... command).



            You could process them within Praat and put the data you want into a Table object with whatever format and structure you want and save it as either a tab or a comma separated file (see my related answer). To get started, you could use the Down to Table... command available for Formant objects, which will create a Table with the formant data. You can then expand that Table to include data from the Pitch and Intensity objects (or whatever objects you need).



            Alternatively, most (=not all) text-based formats used by Praat are almost YAML, so you could try to convert them and read them as-is into whatever program you want to use later on. I wrote a couple of Perl scripts that do just this, converting to and from JSON/YAML, and a Praat plugin to do this from the Praat GUI. You might want to check those out.






            share|improve this answer


























            • Yes, that's right, I want to get big table with [time][intensity][formants][pitches] any format (xml, csv, txt)

              – bobah75
              Feb 5 '16 at 13:18











            • Can you provide more code? Easily export to table one LongSound file.

              – bobah75
              Feb 5 '16 at 14:01











            • Short of actually writing your script for you, I can't imagine what more code I can provide: I've pointed out the exact commands you need to obtain formant structure, and fundamental frequency and intensity contours; and I've linked to a question with an extensive example of how to put that into a Table. What more code do you want? There's a Down to Table... command for Formant objects that can provide you with a Table to get started; I'll add it to my answer.

              – jja
              Feb 5 '16 at 20:39











            • Thank you, you helped me.

              – bobah75
              Feb 5 '16 at 20:51
















            1














            Assuming that by "all possible data about audio" you only mean fundamental frequency, formant structure and intensity contour (and not, say, spectra, pulses, etc), the easiest way to do this is to generate respectively a Pitch, Formant, and Intensity objects.



            pitch     = To Pitch: 0, min_f0, max_f0
            formant = To Formant (burg): 0,
            ... total_formants, max_formant, 0.025, 50
            intensity = To Intensity: min_f0, 0, "yes"


            You'll still need to know some things about the audio you're processing, though, like the likely frequency of the maximum formant you are interested in, or the range within which you estimate the fundamental to be (you might want to look at this plugin with automatic methods for estimating f0 range).



            As for the exporting, what I assume you mean by this is that you want this information to be accessible from a program that is not Praat. This might be the hardest part, since Praat does not have any standard way to export data, and the data formats that it uses, although they are all text-based, are all very ... Praat-specific (you can check them out by using the Save as text file... command).



            You could process them within Praat and put the data you want into a Table object with whatever format and structure you want and save it as either a tab or a comma separated file (see my related answer). To get started, you could use the Down to Table... command available for Formant objects, which will create a Table with the formant data. You can then expand that Table to include data from the Pitch and Intensity objects (or whatever objects you need).



            Alternatively, most (=not all) text-based formats used by Praat are almost YAML, so you could try to convert them and read them as-is into whatever program you want to use later on. I wrote a couple of Perl scripts that do just this, converting to and from JSON/YAML, and a Praat plugin to do this from the Praat GUI. You might want to check those out.






            share|improve this answer


























            • Yes, that's right, I want to get big table with [time][intensity][formants][pitches] any format (xml, csv, txt)

              – bobah75
              Feb 5 '16 at 13:18











            • Can you provide more code? Easily export to table one LongSound file.

              – bobah75
              Feb 5 '16 at 14:01











            • Short of actually writing your script for you, I can't imagine what more code I can provide: I've pointed out the exact commands you need to obtain formant structure, and fundamental frequency and intensity contours; and I've linked to a question with an extensive example of how to put that into a Table. What more code do you want? There's a Down to Table... command for Formant objects that can provide you with a Table to get started; I'll add it to my answer.

              – jja
              Feb 5 '16 at 20:39











            • Thank you, you helped me.

              – bobah75
              Feb 5 '16 at 20:51














            1












            1








            1







            Assuming that by "all possible data about audio" you only mean fundamental frequency, formant structure and intensity contour (and not, say, spectra, pulses, etc), the easiest way to do this is to generate respectively a Pitch, Formant, and Intensity objects.



            pitch     = To Pitch: 0, min_f0, max_f0
            formant = To Formant (burg): 0,
            ... total_formants, max_formant, 0.025, 50
            intensity = To Intensity: min_f0, 0, "yes"


            You'll still need to know some things about the audio you're processing, though, like the likely frequency of the maximum formant you are interested in, or the range within which you estimate the fundamental to be (you might want to look at this plugin with automatic methods for estimating f0 range).



            As for the exporting, what I assume you mean by this is that you want this information to be accessible from a program that is not Praat. This might be the hardest part, since Praat does not have any standard way to export data, and the data formats that it uses, although they are all text-based, are all very ... Praat-specific (you can check them out by using the Save as text file... command).



            You could process them within Praat and put the data you want into a Table object with whatever format and structure you want and save it as either a tab or a comma separated file (see my related answer). To get started, you could use the Down to Table... command available for Formant objects, which will create a Table with the formant data. You can then expand that Table to include data from the Pitch and Intensity objects (or whatever objects you need).



            Alternatively, most (=not all) text-based formats used by Praat are almost YAML, so you could try to convert them and read them as-is into whatever program you want to use later on. I wrote a couple of Perl scripts that do just this, converting to and from JSON/YAML, and a Praat plugin to do this from the Praat GUI. You might want to check those out.






            share|improve this answer















            Assuming that by "all possible data about audio" you only mean fundamental frequency, formant structure and intensity contour (and not, say, spectra, pulses, etc), the easiest way to do this is to generate respectively a Pitch, Formant, and Intensity objects.



            pitch     = To Pitch: 0, min_f0, max_f0
            formant = To Formant (burg): 0,
            ... total_formants, max_formant, 0.025, 50
            intensity = To Intensity: min_f0, 0, "yes"


            You'll still need to know some things about the audio you're processing, though, like the likely frequency of the maximum formant you are interested in, or the range within which you estimate the fundamental to be (you might want to look at this plugin with automatic methods for estimating f0 range).



            As for the exporting, what I assume you mean by this is that you want this information to be accessible from a program that is not Praat. This might be the hardest part, since Praat does not have any standard way to export data, and the data formats that it uses, although they are all text-based, are all very ... Praat-specific (you can check them out by using the Save as text file... command).



            You could process them within Praat and put the data you want into a Table object with whatever format and structure you want and save it as either a tab or a comma separated file (see my related answer). To get started, you could use the Down to Table... command available for Formant objects, which will create a Table with the formant data. You can then expand that Table to include data from the Pitch and Intensity objects (or whatever objects you need).



            Alternatively, most (=not all) text-based formats used by Praat are almost YAML, so you could try to convert them and read them as-is into whatever program you want to use later on. I wrote a couple of Perl scripts that do just this, converting to and from JSON/YAML, and a Praat plugin to do this from the Praat GUI. You might want to check those out.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 23 '17 at 10:32









            Community

            11




            11










            answered Feb 5 '16 at 12:22









            jjajja

            840817




            840817













            • Yes, that's right, I want to get big table with [time][intensity][formants][pitches] any format (xml, csv, txt)

              – bobah75
              Feb 5 '16 at 13:18











            • Can you provide more code? Easily export to table one LongSound file.

              – bobah75
              Feb 5 '16 at 14:01











            • Short of actually writing your script for you, I can't imagine what more code I can provide: I've pointed out the exact commands you need to obtain formant structure, and fundamental frequency and intensity contours; and I've linked to a question with an extensive example of how to put that into a Table. What more code do you want? There's a Down to Table... command for Formant objects that can provide you with a Table to get started; I'll add it to my answer.

              – jja
              Feb 5 '16 at 20:39











            • Thank you, you helped me.

              – bobah75
              Feb 5 '16 at 20:51



















            • Yes, that's right, I want to get big table with [time][intensity][formants][pitches] any format (xml, csv, txt)

              – bobah75
              Feb 5 '16 at 13:18











            • Can you provide more code? Easily export to table one LongSound file.

              – bobah75
              Feb 5 '16 at 14:01











            • Short of actually writing your script for you, I can't imagine what more code I can provide: I've pointed out the exact commands you need to obtain formant structure, and fundamental frequency and intensity contours; and I've linked to a question with an extensive example of how to put that into a Table. What more code do you want? There's a Down to Table... command for Formant objects that can provide you with a Table to get started; I'll add it to my answer.

              – jja
              Feb 5 '16 at 20:39











            • Thank you, you helped me.

              – bobah75
              Feb 5 '16 at 20:51

















            Yes, that's right, I want to get big table with [time][intensity][formants][pitches] any format (xml, csv, txt)

            – bobah75
            Feb 5 '16 at 13:18





            Yes, that's right, I want to get big table with [time][intensity][formants][pitches] any format (xml, csv, txt)

            – bobah75
            Feb 5 '16 at 13:18













            Can you provide more code? Easily export to table one LongSound file.

            – bobah75
            Feb 5 '16 at 14:01





            Can you provide more code? Easily export to table one LongSound file.

            – bobah75
            Feb 5 '16 at 14:01













            Short of actually writing your script for you, I can't imagine what more code I can provide: I've pointed out the exact commands you need to obtain formant structure, and fundamental frequency and intensity contours; and I've linked to a question with an extensive example of how to put that into a Table. What more code do you want? There's a Down to Table... command for Formant objects that can provide you with a Table to get started; I'll add it to my answer.

            – jja
            Feb 5 '16 at 20:39





            Short of actually writing your script for you, I can't imagine what more code I can provide: I've pointed out the exact commands you need to obtain formant structure, and fundamental frequency and intensity contours; and I've linked to a question with an extensive example of how to put that into a Table. What more code do you want? There's a Down to Table... command for Formant objects that can provide you with a Table to get started; I'll add it to my answer.

            – jja
            Feb 5 '16 at 20:39













            Thank you, you helped me.

            – bobah75
            Feb 5 '16 at 20:51





            Thank you, you helped me.

            – bobah75
            Feb 5 '16 at 20:51













            0














            Here's a script solves the problem.



            form Give the parameters for pause analysis
            comment soundname:
            text soundname 1.wave
            comment outputFileName.csv:
            text outputFileName result.csv
            endform

            min_f0 = 75
            max_f0 = 350

            Read from file: soundname$
            soundname$ = selected$ ("Sound")

            select Sound 'soundname$'
            formant = To Formant (burg): 0, 4, 5000, 0.025, 50
            formantStep = Get time step


            selectObject: formant
            table = Down to Table: "no", "yes", 6, "yes", 3, "yes", 3, "yes"
            numberOfRows = Get number of rows

            select Sound 'soundname$'
            pitch = To Pitch: 0, min_f0, max_f0

            selectObject: table
            Append column: "Pitch"

            for step to numberOfRows
            selectObject: table
            t = Get value: step, "time(s)"

            selectObject: pitch
            pitchValue = Get value at time: t, "Hertz", "Nearest"

            selectObject: table
            Set numeric value: step, "Pitch", pitchValue
            endfor


            #export to csv
            selectObject: table
            Save as comma-separated file: outputFileName$
            removeObject(table)

            echo Ok





            share|improve this answer




























              0














              Here's a script solves the problem.



              form Give the parameters for pause analysis
              comment soundname:
              text soundname 1.wave
              comment outputFileName.csv:
              text outputFileName result.csv
              endform

              min_f0 = 75
              max_f0 = 350

              Read from file: soundname$
              soundname$ = selected$ ("Sound")

              select Sound 'soundname$'
              formant = To Formant (burg): 0, 4, 5000, 0.025, 50
              formantStep = Get time step


              selectObject: formant
              table = Down to Table: "no", "yes", 6, "yes", 3, "yes", 3, "yes"
              numberOfRows = Get number of rows

              select Sound 'soundname$'
              pitch = To Pitch: 0, min_f0, max_f0

              selectObject: table
              Append column: "Pitch"

              for step to numberOfRows
              selectObject: table
              t = Get value: step, "time(s)"

              selectObject: pitch
              pitchValue = Get value at time: t, "Hertz", "Nearest"

              selectObject: table
              Set numeric value: step, "Pitch", pitchValue
              endfor


              #export to csv
              selectObject: table
              Save as comma-separated file: outputFileName$
              removeObject(table)

              echo Ok





              share|improve this answer


























                0












                0








                0







                Here's a script solves the problem.



                form Give the parameters for pause analysis
                comment soundname:
                text soundname 1.wave
                comment outputFileName.csv:
                text outputFileName result.csv
                endform

                min_f0 = 75
                max_f0 = 350

                Read from file: soundname$
                soundname$ = selected$ ("Sound")

                select Sound 'soundname$'
                formant = To Formant (burg): 0, 4, 5000, 0.025, 50
                formantStep = Get time step


                selectObject: formant
                table = Down to Table: "no", "yes", 6, "yes", 3, "yes", 3, "yes"
                numberOfRows = Get number of rows

                select Sound 'soundname$'
                pitch = To Pitch: 0, min_f0, max_f0

                selectObject: table
                Append column: "Pitch"

                for step to numberOfRows
                selectObject: table
                t = Get value: step, "time(s)"

                selectObject: pitch
                pitchValue = Get value at time: t, "Hertz", "Nearest"

                selectObject: table
                Set numeric value: step, "Pitch", pitchValue
                endfor


                #export to csv
                selectObject: table
                Save as comma-separated file: outputFileName$
                removeObject(table)

                echo Ok





                share|improve this answer













                Here's a script solves the problem.



                form Give the parameters for pause analysis
                comment soundname:
                text soundname 1.wave
                comment outputFileName.csv:
                text outputFileName result.csv
                endform

                min_f0 = 75
                max_f0 = 350

                Read from file: soundname$
                soundname$ = selected$ ("Sound")

                select Sound 'soundname$'
                formant = To Formant (burg): 0, 4, 5000, 0.025, 50
                formantStep = Get time step


                selectObject: formant
                table = Down to Table: "no", "yes", 6, "yes", 3, "yes", 3, "yes"
                numberOfRows = Get number of rows

                select Sound 'soundname$'
                pitch = To Pitch: 0, min_f0, max_f0

                selectObject: table
                Append column: "Pitch"

                for step to numberOfRows
                selectObject: table
                t = Get value: step, "time(s)"

                selectObject: pitch
                pitchValue = Get value at time: t, "Hertz", "Nearest"

                selectObject: table
                Set numeric value: step, "Pitch", pitchValue
                endfor


                #export to csv
                selectObject: table
                Save as comma-separated file: outputFileName$
                removeObject(table)

                echo Ok






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 8 '16 at 8:26









                bobah75bobah75

                2,5761919




                2,5761919






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35204509%2fpraat-script-to-export-all-possible-data-about-audio%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Berounka

                    Different font size/position of beamer's navigation symbols template's content depending on regular/plain...

                    Sphinx de Gizeh