473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

hacking /dev/audio

I was going through the programs of winners if ioccc.I found one excellent
program which would give out the current time from the speakers when the
output of the program is given to /dev/audio.It was very impressive.Can
anybody please tell me how can it be done , I mean how does one know that
giving so and so ascii's will produce so and so sound..
Thanks in advance.
Nov 14 '05 #1
2 1605
"paul Z" <pa****@yahoo.com> wrote:
I was going through the programs of winners if ioccc.I found one excellent
program which would give out the current time from the speakers when the
output of the program is given to /dev/audio.It was very impressive.Can
anybody please tell me how can it be done , I mean how does one know that
giving so and so ascii's will produce so and so sound..


I'm sorry, but this topic does not belong to this newsgroup, because the
implementation has nothing to do with C, neither has /dev/audio. Here
are some lines anyway:

It is not possible, in practise, to just write some values to
/dev/audio and get something sensible out (at least human speech).
If the sampling rate of the audio data is 8000 it means
that 8000 bytes will produce one second of sound. The trick is that
one records all numbers and other elements (pronounced by a human
person)
needed to produce time and then concatenates then in the appropriate order.

--
Tapio
Nov 14 '05 #2

"paul Z" <pa****@yahoo.com> wrote in message
I mean how does one know that giving so and so ascii's will
produce so and so sound..

I don't know exactly how the sound sytem works on that platform, but it
probably expects binary data in either 16-bit or 8-bit format. Since ASCII
characters are just small integers, by passing the right text you can
generate an appropriate soundwave.
How does he get the sounds? Probably by recording English phomemes with a
digital microphone, then just reading the text as ASCII.
Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bruce Bon | last post by:
The class below is intended to play a Sun audio file (.au) in the background while the main thread, which is servicing a GUI, continues without impact. It doesn't work. For a sound file that...
1
by: laredotornado | last post by:
Hello, I want to play an audio file embedded on my page by clicking on an audio image and the page change to a new page. Is there a cross-browser Javascript way to do this? Right now the code I...
8
by: fuliopen | last post by:
I like to create some audio files for my web site. These are all language files to help the visitor learn a foreign language. There is no music. As far as I know, I can create three types of...
0
by: laredotornado | last post by:
Hello, I want to play an audio file by clicking on an audio icon and not having the page switch out underneath. Right now the code I have is ... <html> <head> <title>Dictionary:...
4
by: Gary Morrison | last post by:
I need to create a lot of fairly-short audio files from the concatenation of a lot of even shorter audio files. I'd like to control that from a Perl script. The audio files would presumably be...
3
by: abrtlt | last post by:
I would like to have a web page in which, when the user clicks on any of several specific elements, a specific audio file is played, without reloading the page. The specific audio file name is...
2
by: hzgt9b | last post by:
Using VS2003, VB.NET, BACKGROUND I have a window forms based application that will be distributed and executed directly from CD media. The app contains a TreeView control and a WebBroswer...
1
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
I am using Windows Media Player to play my half second audio files one after the other using the code below... My problem comes when I play a second audio file immediately after the first one...
3
by: AWW | last post by:
Using XP and VB 2005, it seemed like a good idea to save audio in the clipboard and then play it with backgroundworker. Cannot find a good Clipboard audio example anywhere - just SetAudio and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.