Announcement: PapagayoMOD v1.3.5 (XSheet, Image export, etc)

Discuss Papagayo issues here

Moderators: Víctor Paredes, slowtiger

User avatar
Fazek
Posts: 246
Joined: Thu Apr 13, 2006 1:37 pm
Location: Hungary
Contact:

Post by Fazek »

Sorry, there is no error message. Python thinks everything's fine.
- - - Fazek
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

What exactly happens (or doesn't happen)
when you drag a phoneme to the waveform view?
and BTW the thumbnail view wants PIL, make sure you have it installed.
User avatar
Fazek
Posts: 246
Joined: Thu Apr 13, 2006 1:37 pm
Location: Hungary
Contact:

Post by Fazek »

The text fields above are jumping together (as you see on the pictures). The dropped new phoneme has no effect: not appears on the timeline.

Oh yes! If I drop the phoneme on an unprocessed (freshly loaded) sound, I get the following message:
Traceback (most recent call last):
File "/home/fazekas/papaga/WaveformView.py", line 78, in OnDropText
self.view.InsertPhonemeOnCurrentFrame(phoneme)
File "/home/fazekas/papaga/WaveformView.py", line 354, in InsertPhonemeOnCurrentFrame
phrase = self.doc.currentVoice.phrases[self.closestPhraseIdx]
IndexError: list index out of range
Something else: I made a little correction on the LipsyncFrame.py file:
After def RunBreakdown(self, parentWindow, language, lang_dict):

Code: Select all

		except:
			# this word was not found in the phoneme dictionary

			try:
				pronunciation= rememberDictionary[text.upper()]
				for p in pronunciation:
				       	if len(p) == 0:
				       		continue
				       	phoneme= LipsyncPhoneme()
				       	phoneme.text = p
				       	self.phonemes.append(phoneme)
			except:
				dlg = PronunciationDialog(parentWindow)
				dlg.wordLabel.SetLabel(dlg.wordLabel.GetLabel() + ' ' + self.text)
				if dlg.ShowModal() == wx.ID_OK:
					pronunciation= dlg.phonemeCtrl.GetValue().split()
					rememberDictionary[text.upper()]= pronunciation
					for p in pronunciation:
						if len(p) == 0:
							continue
						phoneme = LipsyncPhoneme()
						phoneme.text = p
						self.phonemes.append(phoneme)
					dlg.Destroy()
And added a rememberDictionary = {} declaration. It remembers all entered unknown pronunciations. I think it is useful, but I feel you can simplify this code. I don't understand well how the variable handling works, so maybe it is possible to move the 'for' cycle outside of these things.
- - - Fazek
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

The text fields above are jumping together (as you see on the pictures). The dropped new phoneme has no effect: not appears on the timeline.
What text fields do you mean (the XSheet, the phonemes on the waveforme view, ??)?
What pictures? Did you mean the phoneme thumbnails? :(

BTW dragging phonemes on an empty (unprocessed, freshly loaded) sound doesn't and it is not meant to work because there are no words to add the phonemes under.
User avatar
Fazek
Posts: 246
Joined: Thu Apr 13, 2006 1:37 pm
Location: Hungary
Contact:

Post by Fazek »

See the pictures on my reply begining with "SuSE Linux 10.0, gnome wm
Python 2.4.1..."
in the previous page of this topic. Maybe I added them right after your answer...
- - - Fazek
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

OK I see them now.
Did you drag a phoneme under the region of a word or outside?
On what frame did you drag the phoneme to?

From what i see my guess is that you draged under the word test or outside the phrase.
Is my guess correct?
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

I think I fixed it.
download the new 'waveform.py' from here:

-----------link removed------------------

and tell me if it works

P.S. The same problem happened under windows too.
Last edited by nassosy on Sun May 13, 2007 9:27 pm, edited 1 time in total.
User avatar
Fazek
Posts: 246
Joined: Thu Apr 13, 2006 1:37 pm
Location: Hungary
Contact:

Post by Fazek »

Now it works, but it puts the new phoneme into the first frame and not into the position of the release. Could you tell me shortly, what is the arrangement of the word and phoneme variables, and where is your insert algorythm? I would like to try to fix it on my computer...

Another little bug: the vertical size of the window is too small. My screen is 1280x1024. The Phonetic breakdown buttons, the Breakdown and Xsheet tags below are always hidden when I start the program and I must resize the window manually. Is it a bug in the wxGTK? Is it an automatically calculated size or changeable?
- - - Fazek
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

Fixed a couple of bugs and Uploaded a new patch v1.3.4 to v1.3.5:
"http://www.oxyshare.com/get/94444630545 ... apagayoMOD 1.3.5 src patch.rar.html"

The splitter between the waveform and the xsheet/breakdown views is automatically calculated and should be in the middle of the window when the program starts.
Yes it is resizable, that's why I put it there.
Under windows it works as it should.
it is propably a bug in the wxGTK.

The phoneme insertion is done in the method 'InsertPhonemeOnCurrentFrame()' of the WaveFormView class in WaveformView.py
It assumes that the 'QueryScrubFrame()' method has been called and the var 'scrubFrame' has been set.

The 'QueryScrubFrame()' checks the mouse pointer and sequentially searches all the phrases, words and phonemes to see in which (horizontally) the mouse pointer is on.
If the mouse is in the same Y region but doesn't hit any phrase/word/phoneme the arlgorithm stores the index of the one that is closest to it and on the left. (in vars named like 'closestWordIdx', etc)
If the mouse hits something, that is stored in variables named like 'selectedPhoneme', etc.
It then also stores the phrases/words that are over the mouse pointer in the vars 'parentPhrase', 'parentWord'

The 'InsertPhonemeOnCurrentFrame()' works like this:
If a phoneme has been hit (selectedPhoneme!=None) it then deletes it and puts a new one at its place.
(NOTE: you cannot reuse the same because of the undo/redo mechanism)
Else if a word was hit but not a phoneme, insert the new phoneme after the one whose index is "closestPhonemeIdx"
(NOTE: We initialize "closestPhonemeIdx" to "-1" so that it works even in the case where the user inserts it as the first one, before everything else)

Else if a phrase was hit but neither a word nor a phoneme,
resize the closest word and insert the phoneme at its end or start.

Else if nothing was hit, resize the closest phrase and word and insert the phoneme at its start or end.

The PreUndo() and FinishPreUndo() methods create a position undo state recursivelly.
User avatar
Fazek
Posts: 246
Joined: Thu Apr 13, 2006 1:37 pm
Location: Hungary
Contact:

Post by Fazek »

I know I know I know!

You set the initial value of self.scrubFrame in the OnMouseDown method! But (at least under Linux) the mouse is on the left hand side phoneme list then!

1. You must put this into the OnMouseUp method
2. You must remove the self.scrubFrame= -1 from the OnMouseUp
- - - Fazek
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

You set the initial value of self.scrubFrame in the OnMouseDown method! But (at least under Linux) the mouse is on the left hand side phoneme list then!

1. You must put this into the OnMouseUp method
2. You must remove the self.scrubFrame= -1 from the OnMouseUp
The OnMouseDown() belongs to the WaveformView, so when you click
on the phoneme thumnail list the WaveformView.OnMouseDown()
method is NOT called by the event system.

When during the dragging your mouse ENTERs the waveformview,
the PhonemeDropTarget.OnEnter() is called and that is where
a WaveformView.OnMouseDown() event is simulated,
so that the user will be able to scrub and hear the sound
before dropping the phoneme.
User avatar
Fazek
Posts: 246
Joined: Thu Apr 13, 2006 1:37 pm
Location: Hungary
Contact:

Post by Fazek »

Yes but my solution works (try it if you don't believe)! I made some print commands in the WaveformView body so I see that the OnMouseDown activated when I click on the phoneme list, and the OnMouseUp as well when I release the button above the WaveformView. And the valid position of the mouse for the scrubFrame is the button RELEASE position and not where you press it! (But I think you are using this scrubFrame for other purposes as well so the original operation in the OnMouseUp is also neccessary).
- - - Fazek
mykyl1966
Posts: 36
Joined: Mon Nov 22, 2004 10:53 pm

Post by mykyl1966 »

ANywhere else to download this from? All I see at the bottom are links to other sites and login pages and I get enough spam without giving details to others.

Cheers

Mike R
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

The scrubFrame is constantly updated during OnMouseMove() [line 725]
so there is no need to set it in OnMouseUp()
since the valid position position is already in the
scrubFrame when the mouse button is released.

The only reason I set scrubFrame initialy during OnMouseDown()
(aside from sound preview) is to avoid the situation where the user presses the mouse and then releases it without moving.
But the main place where the scrubFrame must be updated is the OnMouseMove() method.

And the other thing you have to understand is that during drag-n-drop
PhonemeDropTarget receives events before WaveformView does.
So by the time the WaveformView.OnMouseUp() is called the phoneme
has already been inserted by PhonemeDropTarget

And anyway,
the drag-n-drop bug was in the insertion algorithm (which was fixed),
not the drag-n-drop scrubFrame updating.
nassosy
Posts: 59
Joined: Wed Sep 06, 2006 4:52 pm
Location: Greece

Post by nassosy »

mykyl1966 wrote:ANywhere else to download this from? All I see at the bottom are links to other sites and login pages and I get enough spam without giving details to others.

Cheers

Mike R
At the bottom of the Oxyshare page there is a link that says "Fast and Extreme" in blue,
click that to get to the download page.
There you will have to wait 30 seconds before the actual download link appears at the bottom of the page again.
Post Reply