About do Dial Tone Output example

Hi:

I do the Example 1. Dial Tone Output from
http://www.gnu.org/software/gnuradio/doc/exploring-gnuradio.html

And I got error message.

What can I do?

Thank in advance.

emily@ncku-34be181a97 /usr/bin
$ env python
Python 2.5.2 (r252:60911, Dec 2 2008, 09:26:14)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type “help”, “copyright”, “credits” or “license” for more information.

from gnuradio import gr
from gnuradio import audio
def build_graph ():
… sampling_freq = 48000
… ampl = 0.1

… fg = gr.flow_graph ()
… src0 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 350, ampl)
… src1 = gr.sig_source_f (sampling_freq, gr.GR_SIN_WAVE, 440, ampl)
… dst = audio.sink (sampling_freq)
… fg.connect ((src0, 0 ), (dst, 0))
… fg.connect ((src1, 0 ), (dst, 1))

… return fg

if name == ‘main’:
… fg = build_graph ()
… fg.start ()
… raw_input ('Press Enter to quit: ')
… fg.stop ()

Traceback (most recent call last):
File “”, line 2, in
File “”, line 5, in build_graph
AttributeError: ‘module’ object has no attribute ‘flow_graph’

Li Mei-Wen wrote:

Hi:

I do the Example 1. Dial Tone Output from http://www.gnu.org/software/gnuradio/doc/exploring-gnuradio.html

This link is very old, out of date.

And I got error message.

What can I do?

Try this dial tone, it should come with your gnuradio install:
http://gnuradio.org/cgit/gnuradio.git/tree/gnuradio-examples/python/audio/dial_tone.py

-Josh