Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6230299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:43:20+00:00 2026-05-24T09:43:20+00:00

I have written this code which is, param_values = { ‘aa’ : [[-1,-1], [-1,-1],

  • 0

I have written this code which is,

param_values = {
      'aa' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,1.0], [-1,-1]],     
      'ae' : [[-1,-1], [-1,-1], [0.3,0.4], [-1,-1], [0.15,1.0], [-1,-1]], 
      'ah' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,1.0], [-1,-1]], 
      'ao' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.3,1.0], [-1,-1]], 
      'b'  : [[-1,-1], [0.2,1.0], [-1,-1], [-1,-1], [0.15,0.2], [-1,-1]], 
      'ch' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.4], [-1,-1]], 
      'd'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.4], [-1,-1]], 
      'dh' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.35], [-1,-1]], 
      'dx' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.35], [-1,-1]], 
      'eh' : [[-1,-1], [-1,-1], [0.1,0.5], [-1,-1], [0.4,0.7], [-1,-1]], 
      'er' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.5], [-1,-1]], 
      'ey' : [[-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [0.3,0.5], [-1,-1]], 
      'f'  : [[0.5,1.0], [-1,-1], [-1,-1], [-1,-1], [-1,-1], [-1,-1]], 
      'g'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.8], [-1,-1]], 
      'hh' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.8], [-1,-1]], 
      'ih' : [[-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [0.05,0.15], [-1,-1]], 
      'iy' : [[-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [0.1,0.15], [-1,-1]], 
      'jh' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.6], [-1,-1]], 
      'k'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.8], [-1,-1]], 
      'l'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.6], [-1,-1]], 
      'm'  : [[-1,-1], [0.2,1.0], [-1,-1], [-1,-1], [0.15,0.2], [-1,-1]], 
      'n'  : [[-1,-1], [-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [-1,-1]], 
      'ng' : [[-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [0.09,0.3], [-1,-1]], 
      'p'  : [[-1,-1], [0.2,1.0], [-1,-1], [-1,-1], [0.15,0.2], [-1,-1]], 
      'r'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.6], [-1,-1]], 
      's'  : [[-1,-1], [-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [-1,-1]],
      'sh' : [[-1,-1], [-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [-1,-1]], 
      't'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.4], [-1,-1]], 
      'th' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.2], [-1,-1]], 
      'uh' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.5,1.0]], 
      'uw' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.5,1.0]], 
      'v'  : [[0.5,1.0], [-1,-1], [-1,-1], [-1,-1], [-1,-1], [-1,-1]], 
      'w'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.2,1.0]], 
      'y'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.4], [-1,-1]],  
      'z'  : [[-1,-1], [-1,-1], [-1,-1], [0.3,1.0], [-1,-1], [-1,-1]], 
      'zh' : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.15,0.6], [-1,-1]], 
      'o'  : [[-1,-1], [-1,-1], [-1,-1], [-1,-1], [-1,-1], [0.4,1.0]]
     }

def coart(phonemeFile) :
    """ Coarticulation function where forward and backward coarticulation take place a  and parameter values are generated"""
    with open("syllabifiedPhonemes.txt", "r") as pFile :
        for line in pFile :
            line = line.split()
            if line == "'" :
                continue

param_values is the list of phonemes which has the corresponding lists of each phoneme. The list each phoneme has, relates to a blend shape slider value I got from Maya. I have 6 blendshapes in Maya which are lower_lip_under_upper_teeth,lips_touch,lips_spread, teeth touch,jaw_open and lips_round. So these values are the ranges which a phoneme has for each slider value.

[-1,-1] indicates that particular blendshape is not in use. And the other values are the ranges in which the shapes can move.

The list shows, mostly its just a single lip shape that is active for one phoneme and the rest of them are [-1,-1]. But for some phonemes there are 2 or 3 lip shapes active at the same time. I have manually animated them in Maya. The values for lip shape varies from 0 to 1.

The contents of the input file, syllabifiedPhonemes.txt is,

sh iy ' hh eh ' t er ' t aa r k ' s uw t n ' k r iy s ' hh iy ' w aa ' sh w aa dx ' er ' l ih ' y er

The program should go through all of these phonemes in the file and set the values of its corresponding lip shapes by referring to the list above. Those values should be stored so that further work can be carried out. The single quote represents syllable boundaries. At first the program should go through the phonemes ignoring syllable boundaries and save their lip shape values for all the shapes. Then in the next stage it should start looking inside each boundary.

So far I only have this but I am blank on how to proceed further. I guess I have explained my query properly. Thank you.

The values are the ones for the shapes present inside the shapes list. Could anyone help please. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T09:43:20+00:00Added an answer on May 24, 2026 at 9:43 am

    First, some notes …

    • You missed a comma at the end of the ‘zh’ line in the dictionary.
    • “tFile” should be “pFile”, right?
    • Shouldn’t

      if line == ” ‘ “:

      be

      if line ==”‘”:

    How about this? …

    def coart(phonemeFile) :
        """ Coarticulation function where forward and backward coarticulation take place a  and parameter values are generated"""
    
        all_lines = []
        with open(phonemeFile, "r") as pFile :
            for line in pFile :
                next_line = []
                line = line.split()
                for syllable in line:           
                    if syllable == "'" :
                        continue
                    next_coart = param_values.get(syllable)
                    next_line.append( (syllable, next_coart) )
                all_lines.append(next_line)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written this code which accesses the Delete method on Web Service x,
I have written this code to join ArrayList elements: Can it be optimized more?
I have written this code to convert string in such format 0(532) 222 22
I have this code written in .NET 4.0 using VS2010 Ultimate Beta 2: smtpClient.Send(mailMsg);
I have this code in my ASP.NET application written in C# that is trying
In our application, I have seen code written like this: User.java (User entity) public
I have always written my boolean expressions like this: if (!isValid) { // code
This is similar to this question, except the code is already written. I have
I have written this program, which sorts some ints using a functor: #include<iostream> #include<list>
I have written this code for myself(it is not a home work) I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.