format_wav.c: Unexpected frequency mismatch 16000 (expecting

Voices aren't working properly?

format_wav.c: Unexpected frequency mismatch 16000 (expecting

Postby mkoenig » Tue Oct 04, 2011 4:05 pm

Problem with asterisk and Allison-8kHz.

I have entered this at Nerdvittles and have no replies after several days.

See below: --------------------------------------------------------------------

I'm having a problem getting nv-weather-zip.php to work. Actually the script accomplishes the following:

Nerd Vittles ZIP Weather ver. 4.1 (c) Copyright 2007-2008, Ward Mundy. All Rights Reserved.

September 30, 2011 - 21:00:28 *** New session ***

agi_request: nv-weather-zip.php
agi_channel: SIP/1001-0000000f
agi_language: en
agi_type: SIP
agi_uniqueid: 1317430815.15
agi_version: 1.8.5.0
agi_callerid: 1001
agi_calleridname: device
agi_callingpres: 0
agi_callingani2: 0
agi_callington: 0
agi_callingtns: 0
agi_dnid: 947
agi_rdnis: unknown
agi_context: from-internal
agi_extension: 947
agi_priority: 8
agi_enhanced: 0.0
agi_accountcode:
agi_threadid: 152320912
agi_arg_1: 21788

ZIP Code: 21788

Query: SELECT * FROM `zipcodes` WHERE `zip` = "21788"


Matching Records: 1


City: THURMONT, MARYLAND


Query Results:
<div align="center">
Thurmont, MD<br>
Current Local Conditions at:<br>
Frederick Municipal Airport<br>Lat: 39.42 N &nbsp; Lon: 77.37 W &nbsp; Elev: 308 ft<br>
Last Update: 09/30/11, 08:31 PM EDT<br>
Partly Cloudy: 57 &deg;F<br>
<hr>
<a href="port_mp_ns.php?select=1&CityName=Thurmont&si te=LWX&State=MD&warnzone=MDZ004"><u>Detailed 7-day Forecast</u></a><br>
<a href="port_mp_ns.php?select=2&CityName=Thurmont&si te=LWX&State=MD&warnzone=MDZ004&radar_lc=klwx"><u> Your Local Radar</u></a><br>
<a href="port_mp_ns.php?select=3&CityName=Thurmont&si te=LWX&State=MD&warnzone=MDZ004"><u>Current Conditions</u></a><br>
<a href="port_mp_ns.php?select=4&CityName=Thurmont&si te=LWX&State=MD&warnzone=MDZ004&satid=ECI8"><u>Sat ellite Image</u></a><br>
<a href="port_mp_ns.php?select=5&CityName=Thurmont&si te=LWX&State=MD&warnzone=MDZ004"><u>Hazardous Weather</u></a><br>
<a href="pil.php?pil=LWXAFDLWX"><u>Area Forecast Discussion</u></a><br>
<hr>
<form><input type="button" value="Back to previous page" onClick="history.back()"></form></br></div>


Summary: This National Weather Service update provided for THURMONT, MARYLAND. Current local conditions at .
Frederick Municipal Airport .
As last reported on: September 30 at 8:31 P.M. Eastern Daylight Time.
Partly Cloudy: 57 degrees fair in height.



Current Conditions: Current Weather Conditions: Partly Cloudy.
Temperature: 57 degrees fair in height , 14 degrees centigrade .
Humidity: 63 per cent .
Wind Direction and Speed: Calm.
Barometric Pressure: 29.73 inches.
Dewpoint: 45 degrees fair in height , 7 degrees centigrade . Visibility: 10 miles.


Forecast: Here's the latest forecast. Tonight . Mostly cloudy. Lows in the upper 40s. Northwest winds 10 to 15 miles per hour . Saturday . Cloudy. Showers likely. mainly in the afternoon. Highs in the mid 50s. Northwest winds 10 to 15 miles per hour with gusts up to 25 miles per hour . Chance of rain 60 percent. Saturday Night . Mostly cloudy with a 50 percent chance of showers. Lows in the lower 40s. Northwest winds 15 to 20 miles per hour with gusts up to 30 miles per hour . Sunday . Cloudy with a 40 percent chance of showers. Highs in the mid 50s. West winds 15 to 20 miles per hour with gusts up to 30 miles per hour . Sunday Night . Mostly cloudy in the evening. then becoming partly cloudy. A 40 percent chance of showers. Cold with lows in the lower 40s. West winds 10 to 15 miles per hour . Monday . Mostly cloudy with a 40 percent chance of showers. Highs in the lower 60s. Monday Night . Partly cloudy with a 30 percent chance of showers. Lows in the mid 40s. Tuesday . Sunny. Highs in the upper 60s. Tuesday Night . Mostly clear. Lows in the upper 40s. Wednesday . Sunny. Highs in the upper 60s. Wednesday Night . Mostly clear. Lows in the upper 40s. Thursday . Mostly sunny. Highs in the upper 60s. Thursday Night . Partly cloudy. Lows in the upper 40s. Friday . Sunny. Highs around 70. That concludes the detailed weather forecast. Have a nice day Sue. Goodbye.

exec swift "Your report was successfully downloaded Sue. Please stand bye."
200 result=0
SET VARIABLE TMPWAVE tts/tts-73271c97a1523474260c96b9fbe2c711
200 result=1

I purchased Allison-8kHz and am able to play her voice. swift.conf is set to use this as a default.

The /var/log/asterisk/full shows:
[2011-09-30 21:00:48] VERBOSE[27947] res_agi.c: -- <SIP/1001-0000000f>AGI Script nv-weather-zip.php completed, returning
0
[2011-09-30 21:00:48] VERBOSE[27947] pbx.c: -- Executing [947@from-internal:9] NoOp("SIP/1001-0000000f", "Wave file: tts
/tts-73271c97a1523474260c96b9fbe2c711") in new stack
[2011-09-30 21:00:48] VERBOSE[27947] pbx.c: -- Executing [947@from-internal:10] Playback("SIP/1001-0000000f", "tts/tts-7
3271c97a1523474260c96b9fbe2c711") in new stack
[2011-09-30 21:00:48] WARNING[27947] format_wav.c: Unexpected frequency mismatch 16000 (expecting 8000)
[2011-09-30 21:00:48] WARNING[27947] file.c: Unable to open format wav

The file is written to the sound/tts directory but when I listen to the file with swift I can hear what sounds like a header from a Cepstral file, but it is not the weather report.

a linux file command shows the following:
/var/lib/asterisk/sounds/tts/tts-081f32102b35be1066739da85be893b9.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz



The configuration is as follows:

Asterisk = ONLINE | Dahdi = ONLINE | MySQL = ONLINE │
│ SSH = ONLINE | Apache = ONLINE | Iptables = ONLINE │
│ Fail2ban = ONLINE | Internet = ONLINE | Ip6Tables = ONLINE │
│ BlueTooth = ONLINE | Hidd = ONLINE | NTPD = ONLINE │
│ SendMail = ONLINE | Samba = OFFLINE | Webmin = ONLINE │
│ Ethernet0 = ONLINE | Ethernet1 = N/A | Wlan0 = N/A │
│ │
│ PBX in a Flash Version = 1.7.5.6 Running on *HARDWARE* │
│ FreePBX Version = 2.8.1.4 │
│ Running Asterisk Version = 1.8.5.0 │
│ Asterisk Source Version = 1.8.5.0 │
│ Dahdi Source Version = 2.5.0.1+2.5.0.1 │
│ Libpri Source Version = 1.4.12 │
│ IP Address = 192.xxx.xxx.xxx on eth0 │
│ Operating System = CentOS release 5.7 (Final) │
│ Kernel Version = 2.6.18-238.9.1.el5 - 32 Bit

This is an old P4 laptop with 756 mb ram and seems to run fine.

I have run out of options. Does anyone have an idea?
mkoenig
 
Posts: 1
Joined: Sun Oct 02, 2011 9:46 am
Location: Thurmont, Maryland

Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 5 guests

cron