Saturday, October 31, 2009

When an "A" is not an "A"


Why do some audio codecs need so much more data than others? Consider this:




Text files and image files take completely different approaches to how they save information.  A text file doesn’t save how your words look, it saves what the words are.   An image file is the opposite:  it preserves the look of things, and doesn’t care with what they represent.   

If a text file only needs to distinguish among 256 different characters – and that give you ten alphabets’ worth of special characters – then each letter needs eight bits.  One byte per character.  That’s pretty efficient, but it only works because we’ve limited its abilities: it’s only allowed to store text, not pictures, and we have to agree beforehand on what those 256 characters are.

Image files, on the other hand, only assume that the source is an image, any image.  A good example is .jpg format (JPEG is “Joint Photographic Experts Group,” the party animals who first agreed on that standard).  So it starts with an arbitrary image, a checkerboard of any number of pixels, and then follows an algorithm to boil that down as best it can by removing redundancies.  But it’s always limited by its inability to make many simplifying assumptions.  It can’t take the easy road that a .txt file can, just assuming the source is a letter; it could be a fondue pot.

Let’s try a simple case:  I want to send the letter “A” somewhere. 

Text file
Here’s your eight bits:  01000001 in binary.  A bunch of people called ASCII agreed on this lookup table many decades ago – it’s just another kind of Morse code. 



Jpg file
Since I want to send a clear picture of the letter “A,”




I’ll start with an image space about 160 x 180 pixels.  That’s 2880 pixels for a really clear letter (see how nice it looks?).   Then, depending on how aggressive I’m willing to be, I can boil that down anywhere from 2x to maybe 20x.   Add overhead for arbitrary color (three colors, remember), and this one-byte letter is now tens or hundreds of bytes. 

What did I get in return for all this extra space?   I can send any picture I want.  





Speech codecs are like that too - they offer the same tradeoffs.  I’ll talk about that next.

Footnote:  Text coding is a slippery slope.  The move to multilingual documentation has pushed a transition to double-byte coding.  256 choices is no longer enough, we now need 256^2, or 65,536 choices to handle the possibilities of Chinese language, Farsi, and all the rest.  See what happened?  By growing the number of choices, we grow the “codebook” and so make the coding more versatile but less efficient.  This is a form of what is called, in its most general form, “vector coding.”  Vector coding can be used for image compression, and then the codebook can dynamically adapt to the content of the image.  It’s more efficient – fewer bits, but more complex – more calculation.  

Thursday, October 29, 2009


LET’S MEASURE HD VOICE!

Our ability to understand speech can be measured.  The most common method is to select random syllables and ask a group of listeners to write them down, then mess up the audio (muffle the sound by lowering the bandwidth, for example), and run the test again.  When this is done the result looks like this





This picture shows that as we pass more and more of the sound by raising the cut-off frequency, the listener’s accuracy also increases.  This makes sense; we all know it’s hard to understand someone who’s very muffled, and it gets easier when they speak clearly.  That’s why wideband audio in telephony is so important:  with normal phone fidelity – 3 kHz – people make mistakes on one out of ten syllables!   By raising the cut-off to 7kHz with HD Voice, the chart's red line shows this rises to nearly 100%.  And in real-world settings, like accented speech, speakerphones, people sitting too far away, the difference is even more dramatic.

Sunday, October 11, 2009

The Spice of Fidelity

It's been said that the higher sound frequencies aren't very important for speech because there isn't much energy there.  It's hard to argue the point, because it's true - well, part of it is true.  The amount of speech energy that a standard telephone carries is ever so much higher than the amount it cuts off - a hundred times, or more.  So yeah, it's not cutting off that much, there's not much up there.

But this argument is like those tricksters we find in politics, where a fallacy is linked to a truth and then presented as two truths.  There isn't much energy there?  Check.  Not important for speech?  Sound the alarm.  We have to ask: when did we start to assume that the value of those higher frequencies was proportional to their energy?  This is one of those assumptions that looks good on the surface, but we actually prove it fallacious all the time.

Let's talk soup.  If you make a quart of good chicken soup, you'll be using almost a quart of water.  Some noodles, some chicken, and some of this and that: oregano, thyme, marjoram perhaps, a touch of chile, and a nice pinch of salt.  This gives you rough a kilogram of soup.

How much do you suppose those seasonings weigh?  About three grams, mostly salt.  So we can leave them out, right?  They're just a tiny part of the total weight, so they can't be important.  Who cares about three-tenths of a percent?  It's a lot of trouble to get fresh spices anyway, so the economics don't add up.  We'll just leave it all out, and our chicken soup will be soup and chicken, and nobody will be the wiser.

Stop looking at me like that, I'm just proving a point.

Yes, you're right.  Leave out those herbs and the salt, and you've destroyed the succulence of the dish.  And yet they're way less than a hundredth of its weight.

This principle applies everywhere.  Oil on bearings?  It's milligrams on grams.  Perfume?  maybe five milligrams, dabbed behind the ear of a 50,000 milligram lady.  You've got a microscopic veneer of paint on your house, a hint of pigment that floods that deep color into a beautiful silk scarf, a half-carat diamond (1/300 of an ounce) making something suddenly very romantic out of a plain gold ring.  They're all very tiny proportions, but they're what characterizes in the finished product.

The audio that conventional telephones ignore is like that.  Not much energy, but it turns "failing" into "sailing" and an exhausted finish into a successful and energized meeting.

Set your own company's gourmet meeting chefs free.  Restore those HD Voice spices and seasonings so they can begin serving up tastier, more productive telephone conferences!

Thursday, September 24, 2009

From consonants to culture

I did not see this one coming.

I've been talking for years about HD Voice (I'll post another thing about what that is) and how it becomes essential when you have a phone session that's anything less than perfect:  accents, speakerphones, room noise, soft talkers, identification, technical talk or detail of any sort.  But a CEO was telling a story today that added a new dimension for confusion:  culture.

He spoke to us with a noticeable European accent, although nothing particularly thick.  And he told us how some months ago, he was leading a discussion, by speakerphone, with his company's Asia team.  He got to the core of the discussion and launched into a long, involved explanation of the most critical points.  He had some (but not too many) slides, he crefully guided the team through his spreadsheets, he illustrated his lecture with other stories and lessons, and finally reached the triumphant end of a well thought-out and clearly delivered exposition, energized and ready for the flood of excited questions he knew would be coming.

Instead, there was silence.  The distant chirping of crickets.  The room held a long, uncomfortable pause, and finally a quiet, respectful voice hesitatingly stuttered a question that made it instantly clear that they not only didn't understand what he had said, they didn't even understand what the subject was!

As he drew them out with questions of his own, the light dawned.  He realized that their culture was one in which they would never interrupt with questions.  By their traditions, many of them would never ask, even afterward - the greater offense would be to question such a person as him, so they accepted their lot and held silent.

This CEO realized then that any tool that could help them better talk together was going to be essential if this partnership were to succeed.  That's when he had the link converted to wideband audio, HD Voice, for the next meeting.

So I'm adding "culture" to the master list of why-HD-is-essential.  It's another element of how people talk, and it can get in the way when they can't talk clearly.

Monday, July 14, 2008

iPhone vs. Entourage: The iPhone 2.0 Smackdown

September 2009 update:  Yeah yeah yeah I know that even iPhone 3.0 is already a fading memory for most of us and Apple is moving on to create better and more creative affronts to our unrealistic expectations of them.  Writings behind here are rather old, if you haven't noticed, so please take these elder brethern in the forgiving spirit you would extend to a 1958 issue of Popular Science or a printout of an old Gopher page.  They were created on punch cards, after all, so cut me some slack.

With the iPhone 2.0 release now in hand, it’s been time to discover new, and old, issues with synchronization. I’ve inadvertently wiped my Outlook calendar twice, and finally figured out why. There’s a bug in Apple’s iPhone–to–iCal software, and one in Microsoft’s Entourage–to-iCal, if I am getting this right.

First, let’s review how this has been working for the past year or so. Let’s start with the components.

Apple’s calendar program:
Apple has their own calendar program, iCal. It can maintain multiple calendars, which are keyed by color and name. Let’s say you’ve decided to make Private green, and business blue. There’s a list of calendars on the screen, and you can check which ones you want to display at any time. If you have a 9AM private appointment for “Dentist” and a 10AM business appointment for “Meeting”, then your calendar will show “Dentist” in a green box, and “Meeting” in a blue box.

In that list of calendars, you can also highlight a whole calendar, and delete it (it asks if you’re sure).

Apple’s iPhone program:
When you have an iPhone plugged in, you can specify what things should be synchronized: music, videos, contacts, calendar, and so on. You can also specify “copy computer to iPhone just this once” for each function.

What it does is sync iCal to the iPhone. It can also sync .Mac (dot mac), which is their web-based service, in the process so you can keep your calendar in the cloud, but I’ve not enabled that since simple earthbound reliability has been enough of a challenge.

Microsoft’s Office and Sync program:
Microsoft has an Office suite for Mac, and that’s what I’m using, the latest releast: 2008. Word, Excel, PowerPoint. They all look like their PC equivalents, mostly And, for some odd reason, they call the Office suite Entourage, which does email, calendar and contacts, and looks way different from Outlook. But it works, and connects to the corporate server, so I don’t complain. Entourage has a set of Preferences (like all mac apps), and among these are “synchronize events and tasks with iCal and .mac”.

Sync services between Microsoft Office and Mac programs are done by a separate program, "Sync", also written by Microsoft's Mac group.  It's always running, and for the calendar it coordinates Entourage’s database to iCal. You never know when it will do this; there’s an element of surprise involved. Sometimes it’s seconds, sometimes hours.

Office for Mac 2008
I changed from 2004 to 2008 (hesitant to call it “upgraded”) about four months ago. Things have been working fine.

The iPhone
The iPhone has a calendar program which looks a little like...well, like any calendar program. You can see your appointments, open them up to read them, make new appointments.

So those are the pieces. I never use iCal specifically, its blue “Entourage” calendar is just a transfer point for calendar information as it buzzes back and forth between Entourage and iPhone.

Iphone 2.0
This is where peaceful Mac – Windows coexistence starts to collapse. Two different chains of events occurred.

First problem: My Outlook calendar was flooded with newly-generated multiple entries for old events, mostly multiple-day events. So I would have eight entries for an all-day meeting called “Event,” on Wednesday, for example, and six entries for “Different Event” on Thursday, and so on. It pretty much filled the screen although I found that the previous entries were still in there, just covered over. I also found that there were now two “Outlook” calendars in iCal.

What I did:
> Deleted the spurious entries in Outlook by hand.
> Unchecked the “sync Entourage to iCal” preference
> Re-checked the “sync Entourage to iCal” preference. When you do this, it gives a new option to copy Entourage to iCal, copy iCal to Entourage, or merge. I chose “copy Entourage to iCal”.
> Found that iCal had a second Entourage calendar again, so I deleted this.

What happened:
> Entourage was zeroed out, all blank.

What I conclude:
> There’s a bug in the Microsoft sync code for this corner case: if you delete the iCal calendar it’s trying to copy Entourage to, it deletes the Entourage data too.

Second problem:
It turns out that those multiple entries were caused by syncing iCal to iPhone. I clicked the option to copy iCal to iPhone, and multiple entries were the result.

Conclusions:

> Don’t delete a duplicate Entourage calendar in iCal until synchronization is complete. Even then, be scared.

> I am still thinking about how to get iPhone back into orderly synchronization. What should work is
> Copy Entourage to iCal unconditionally once, via Preferences
> Copy iCal to iPhone unconditionally once, via configuration option
> Turn on normal sync

But it’s not operating reliably.

I offer this for those who may encounter the problem. It’s not dissimilar to problems I had several years ago with Palm synchronization to Outlook, but those things appear to have been cleared up and our IT organization is pretty happy with Good (which accounts for their recent sneers at my problems).

Thursday, January 31, 2008

Entourage Not Connecting via VPN: A hint

There are other sources on the web regarding this problem: Entourage 2004 shows  "(Not Connected)" next to the account name, but gives no clue as to why.  This occurs even when the VPN connection exists and is solid, and occurs without warning on an otherwise functional computer.  Most recently, I closed the laptop at one location and opened it at another, re-entering VPN.  Restarting the machine didn't fix it, nor did any of the online advice.

I wandered over to the IP guys, and one of those tolerant gentlepersons suggested that I try using the numeric URL for the Outlook server, rather than its name.   This eliminates the step of going to the DNS. 

Tried that, and it works great.  Thanks, guys!  

Friday, January 18, 2008

Groundswell

I'm at a company conference.  One guy in a large meeting room came over to talk when he saw my laptop - turns out he had been elected by his whole group to ask me how I got the Mac!  

Two weeks ago our desktop computer support person from IT mentioned that he thought we should change all the PC's to Macs.