I wish I could store and retrieve Sound to and from database.

G

Guest

Hi

I don’t want to change my name or anything :) but I wish I was able to save Sound into SQL server and retrieve it

So my question is How do you save a wav file into a SQL server and how do you retrieve it

Thanks so much

Lisa Jone
 
W

William Ryan eMVP

This article shows you how to store images, but a blob is a blob
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp

However, whether or not you want to do this is another story. You'll find
quite a few people with tales of woe trying to store a lot of BLOB data in a
DB only to find it killed performance...
Lisa Jones said:
Hi

I don't want to change my name or anything :) but I wish I was able to
save Sound into SQL server and retrieve it.
 
G

Guest

Why not store the file path to the DB and then save the file to the path. This would help to keep the DB Size down and speed up DB lookups

Glenn
 
W

William Ryan eMVP

I'm with you 100%. I posted a link on how to do it but I really think it's
ill advised unless it's a loooowww traffic db, and even then, it's a lot
easier to store it on a drive and you get the side benefit of being able to
access it without writing a good bit of code.
Glenn Wilson said:
Why not store the file path to the DB and then save the file to the path.
This would help to keep the DB Size down and speed up DB lookups.
 
G

Guest

We have implemented this on several of our systems, and I am now in the process of writing some stored proces and adding fields so that we can refference the files if they are stored on backup tapes
As I work in a telephony Company storing hundreds of thousands of messages we need to have them stored on disk for easy access, but as time goes on these files are not needed straight away. I am writing a process that will remove the path of the file but leave the name, and then add two fields to the records that store a bit value if it is on tape, and then another that lists the tape name. This way the app (Which is also being moderfied) can return what tape needs to be access to find the record

Glenn
 
W

William Ryan eMVP

Cool, thanks for the post
Glenn Wilson said:
We have implemented this on several of our systems, and I am now in the
process of writing some stored proces and adding fields so that we can
refference the files if they are stored on backup tapes.
As I work in a telephony Company storing hundreds of thousands of messages
we need to have them stored on disk for easy access, but as time goes on
these files are not needed straight away. I am writing a process that will
remove the path of the file but leave the name, and then add two fields to
the records that store a bit value if it is on tape, and then another that
lists the tape name. This way the app (Which is also being moderfied) can
return what tape needs to be access to find the record.
 
G

Guest

Hi
Yes I was thinking of storing only the path but there is only one problem and that is security. These are for medical transcripts. So if i store it as file how would i address the security consideration
Thank
Lis
 
G

Guest

Remember that the database is not really that secure, anyone with admin access to the database could view them, and if the database files (SQLServer) are detatched and moved any one can restore them to another DB and open them

One way to secure it would be to encrypt the stream as you save the file, Then the file would just be jiberish and only the app and a proper key could retrive them. As a side note you could also use component ones classes (Availible from the resource kit) to zip or compress the stream as you save it, this would add to the security and also give you a saving on disk space

Glenn
 
C

Cor Ligthert

Hi Lisa,

I agree with Glen and I agree with you.

However the most I agree with you that saving it in a database gives for
your purpose in my opinion a more certain way to manage it.

The wav file is a very old hugh sound format, did you ever thought on a more
modern compact sound format.

Cor
 
C

Cor Ligthert

Not about the topic,

About my text I did give the advise to take a smaller sound format, and than
I think for that is Herfried my first man to give a good advise.

The database part is no problem for me at all, I can assure you that you are
not the first who I would ask for that.

Cor
 
H

Herfried K. Wagner [MVP]

Cor,

* "Cor Ligthert said:
About my text I did give the advise to take a smaller sound format, and than
I think for that is Herfried my first man to give a good advise.

It depends on what you want to do with the audio data. If access must
be possible in little time, decompression should be fast. If data is
streamed over a network, the format must be "streamable" and often data
is heavily (lossy) compressed. There is no general answer.
 
C

Cor Ligthert

* "Cor Ligthert said:
It depends on what you want to do with the audio data. If access must
be possible in little time, decompression should be fast. If data is
streamed over a network, the format must be "streamable" and often data
is heavily (lossy) compressed. There is no general answer.
Linda said that and I agree with here, so my idea was how can you get that
data smaller.
I have seen that serializing and deserializing is possible with any media.
(I have now a complete collection of samples for that in as I think in every
kind of way). I do not think that compressing a sound file makes sense
however if that is possible give your advise, I am absolute a nitwit in
that, without the fact that I know that a wav file is much larger than
nowadays is possible.

This is the text from Linda
----------------------------------------------------------------------------
 
S

Slonocode

I have seen that serializing and deserializing is possible with any media.
(I have now a complete collection of samples for that in as I think in every
kind of way). I do not think that compressing a sound file makes sense
however if that is possible give your advise, I am absolute a nitwit in
that, without the fact that I know that a wav file is much larger than
nowadays is possible.

There are many different compression formats to choose from. mp3, ogg, wma,
aac, realaudio...etc.
It does really depend on what kind of sound needs to be compressed. What
kind of sound is the OP storing with the medical transcripts? Is it 1
second sound effect or perhaps it is a doctor's audio notes that are a few
minutes in length?

How important is the quality of the sound? The more you compress the more
you degrade the quality.
 
S

Slonocode

Lisa Jones said:
Hi all
Thanks all for your comments. Thanks to Cor my name now is Linda :)
Question regarding what kind of vice, these are doc recording. the idea is
offline the speech must be converted to text so Quality if recording is very
important.
Thanks
Lisa


Speech can be compressed much more than music. There are codecs that are
designed specifically for speech.
You may take a look at the Speex codec which is open source and freely
available.
There are others such as GSM.
 
C

Cor Ligthert

Hi *Lisa*

And if you are further,
Herfried knows how to compress
Slonocode knows what sound codec
I know how to serialize

(And probably we know all something about it)

Feel free to ask again.

Success

:)

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top