Skip to content

Commit b3ddf33

Browse files
committed
try and add portaudio to github workflow
1 parent 6476355 commit b3ddf33

1 file changed

Lines changed: 26 additions & 56 deletions

File tree

README.md

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,45 @@
11
Python 3 Blue Box DTMF Tone Generator
22
===================
33

4-
Really simple, functional tone generator
4+
Modernized python blue box
55

66
**How it works**
77

8-
Just type on a sequence of numbers/commands and press enter, your computer will play it back for you!
8+
You can run this in interactive mode, or from a file, pipe, stdin, etc.
99

1010
**Requirements**
1111

12-
- PyAudio https://people.csail.mit.edu/hubert/pyaudio/
12+
- Python 3 (tested on 3.9 - 3.11)
1313

14-
```pip3 install pyaudio```
14+
**Installation**
1515

16-
For OSX you need port audio, which you can install from homebrew:
17-
18-
```brew install portaudio```
16+
```
17+
git clone https://github.com/zeyus/Python3BlueBox.git
18+
cd PythonBlueBox
19+
pip install -r requirements.txt
20+
```
1921

20-
For linux or windows, see your package manager, google it or visit here:
22+
**Usage**
2123

22-
http://www.portaudio.com/download.html
24+
```
25+
./bluebox.py -h
26+
```
2327

24-
**Usage**
28+
**Examples**
2529

2630
```
27-
./PythonBlueBox.py
31+
./bluebox.py -i
2832
```
2933

30-
You'll see the '>>>' prompt.
31-
32-
```>>> U12345O12345```
33-
34-
You can use the 'U' to switch to user tones or 'O' to switch to operator tones
35-
36-
The current tone mapping works as follows:
37-
38-
```python
39-
user_tones = {
40-
'1',
41-
'2',
42-
'3',
43-
'A',
44-
'4',
45-
'5',
46-
'6',
47-
'B',
48-
'7',
49-
'8',
50-
'9',
51-
'C',
52-
'*',
53-
'0',
54-
'#',
55-
'D',
56-
}
57-
op_tones = {
58-
'1',
59-
'2',
60-
'3',
61-
'4',
62-
'5',
63-
'6',
64-
'7',
65-
'8',
66-
'9',
67-
'0', # 0 or "10"
68-
'A', # 0 or "10"
69-
'B', # 11 or ST3
70-
'C', # 12 or ST2
71-
'D', # KP
72-
'E', # KP2
73-
'F', # ST
74-
}
7534
```
35+
./bluebox.py 123456789
36+
```
37+
38+
39+
40+
**Development**
41+
42+
Development of different MF implementations and audio backends is extremely easy now. Just create a new class that inherits from the MF class, and register it.
43+
Same thing for audio backends.
44+
45+
Currently there are two MF implementations (DTMF and MF), and two audio backends (PyAudio and Dummy).

0 commit comments

Comments
 (0)