GithubHelp home page GithubHelp logo

Comments (5)

max-elliott avatar max-elliott commented on July 22, 2024

Sorry for such a late reply, I believe the Session1\dialog\EmoEvaluation directory has the correct .txt files

from emotionalconversionstargan.

max-elliott avatar max-elliott commented on July 22, 2024

@WestbrookZero do you know if this solved your issue? Thanks

from emotionalconversionstargan.

agkphysics avatar agkphysics commented on July 22, 2024

I think the directory structure that comes with IEMOCAP is different to what run_preprocessing.py expects, so I had to make changes to the script get it to look in the correct places. Below are the changes I made:

diff --git a/run_preprocessing.py b/run_preprocessing.py
index cc969c2..63e49f8 100644
--- a/run_preprocessing.py
+++ b/run_preprocessing.py
@@ -30,28 +30,36 @@ def copy_files(iemocap_dir, output_dir):
     if not os.path.exists(annotations_output_dir):
         os.mkdir(annotations_output_dir)
 
-    filenames = []
-    specs = []
-    mels = []
-    labels = []
-    conts = []
-    conts_dis = []
-    speakers = []
     for session in os.listdir(iemocap_dir):
+        if not session.startswith("Session"):
+            continue
+
+        session_dir = os.path.join(iemocap_dir, session)
+
+        annotations_dir = os.path.join(session_dir, "dialog", "EmoEvaluation")
+        for filename in os.listdir(annotations_dir):
+                if not filename.endswith(".txt"):
+                    continue
+
+                src_file = os.path.join(annotations_dir, filename)
+                dest_file = os.path.join(annotations_output_dir, filename)
+                if not os.path.exists(dest_file):
+                    copyfile(src_file, dest_file)
 
-        if not session == ".DS_Store":
-            session_dir = os.path.join(iemocap_dir, session)
-            for foldername in os.listdir(session_dir):
+        wav_dir = os.path.join(session_dir, "sentences", "wav")
+        for foldername in os.listdir(wav_dir):
+            if not foldername.startswith("Ses"):
+                continue
 
-                subsession_dir = os.path.join(session_dir, foldername)
-                if not foldername == ".DS_Store":
-                    for filename in os.listdir(subsession_dir):
+            subsession_dir = os.path.join(wav_dir, foldername)
+            for filename in os.listdir(subsession_dir):
+                if not filename.endswith(".wav"):
+                    continue
 
-                        if not filename == ".DS_Store":
-                            src_file = os.path.join(subsession_dir, filename)
-                            dest_file = os.path.join(annotations_output_dir, filename) if foldername == "Annotations" else os.path.join(audio_output_dir, filename)
-                            if not os.path.exists(dest_file):
-                                copyfile(src_file, dest_file)
+                src_file = os.path.join(subsession_dir, filename)
+                dest_file = os.path.join(audio_output_dir, filename)
+                if not os.path.exists(dest_file):
+                    copyfile(src_file, dest_file)
 
         print(session + " completed.")

from emotionalconversionstargan.

max-elliott avatar max-elliott commented on July 22, 2024

Yes I was aware that the version of the dataset I was using was already restructured in some way. I will look into this issue and possibly update the repo following your changes. Would you be able to create a pull request for this?

from emotionalconversionstargan.

agkphysics avatar agkphysics commented on July 22, 2024

@max-elliott I've created #8 with those changes.

from emotionalconversionstargan.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.