<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>That is already done with the -t option (tuples only)</div><div><br></div><div>Thanks anyway</div><div><br></div><div>Bernard</div><br><div><div>On Mar 4, 2012, at 1:12 AM, Seven Du wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div>
<div>I think you might need a script to strip the column header ?</div><div><br></div><div> psql -c "select 1" |cat </div><div> ?column? </div><div>----------</div><div> 1</div><div>(1 row)</div><div><br></div><div><br></div><div><br></div>
</div>
<div><div><br></div><div>-- </div><div>About: <a href="http://about.me/dujinfang">http://about.me/dujinfang</a></div><div>Blog: <a href="http://www.dujinfang.com">http://www.dujinfang.com</a></div><div>Proj: <a href="http://www.freeswitch.org.cn">http://www.freeswitch.org.cn</a></div><div><br></div>Sent with <a href="http://www.sparrowmailapp.com/">Sparrow</a><br><div><br></div></div><p style="color: #A0A0A8;">On Saturday, March 3, 2012 at 10:17 PM, Bernard Fluixa wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div>Hi there,<div><br></div><div>I'm trying to make a playback of streamed sound data coming from a database. I could make the example included in documentation work (cat file.wav | sox -t wav - $@ -t raw -). However, I can't make it work with same sox options after having uploaded that same file into my PGSQL database and select it instead of a cat command. </div><div><br></div><div>My shell script is</div><div><br></div><div><div>#!/bin/bash</div><div><br></div><div>psql -h <HOST> -U postgres -E -t -q -d <DATABASE> -c "select <BINARY COLUM DATA> from <TABLE> " | sox -t wav - $@ -t raw -</div></div><div><br></div><div>Freeswitch gives me a "sox FAIL formats: can't open input `-': WAVE: RIFF header not found" error message.</div><div><br></div><div><br></div><div>Has anybody streamed data from database into Freeswitch?</div><div><br></div><div>Thank you.</div><div><br></div><div>Bernard</div><div> <font face="monospace"><span style="font-size: 13px; line-height: 14px; white-space: pre; "> </span></font></div><div><br></div></div><div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services:</div><div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></div><div><a href="http://www.freeswitchsolutions.com/">http://www.freeswitchsolutions.com</a></div><div><br></div><div>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</div><div><a href="http://www.cudatel.com/">http://www.cudatel.com</a></div><div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org/">http://www.freeswitch.org</a></div><div><a href="http://wiki.freeswitch.org/">http://wiki.freeswitch.org</a></div><div><a href="http://www.cluecon.com/">http://www.cluecon.com</a></div><div><br></div><div>FreeSWITCH-users mailing list</div><div><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></div><div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></div><div><a href="http://www.freeswitch.org/">http://www.freeswitch.org</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></body></html>