80 lines
15 KiB
Python
80 lines
15 KiB
Python
'''
|
|
This is a voice file library that is used by other programs so that
|
|
hblink can "talk" and provide voice feedback for users. It does nothing
|
|
on it's own, but is called by programs that need to create their own
|
|
voice feedback for users -- like to notify of system events, etc.
|
|
|
|
The format is already HIGHLY processed to make assembly of DMR packets
|
|
quick and easy on the fly. DMR voice packets each contain 3 AMBE
|
|
frames. They are 72bit FEC encoded and they are combined so that
|
|
1.5 of the frames fit on each side of the control information in the
|
|
center of the packet.
|
|
'''
|
|
|
|
from bitarray import bitarray
|
|
|
|
words = {
|
|
'kansas_link': [
|
|
[bitarray('111111101110010010000001000001110111000100000111000111111101010111101011111111011100011110000011001101010011'), bitarray('010100010000010011111000011110001001110010100011100110000010011001100001001001010111100111011100010101010011')],
|
|
[bitarray('111110000001101110100011000001010010001000000010110011111111001100100101111011111111010010000011001101110001'), bitarray('010000010000000011001001010111001110111011101100011110100011011100010111010101000001010011001010000110101100')],
|
|
[bitarray('111111101101010110100010000101110111000001000111001010111101001011111111111111011100010010000011001100110001'), bitarray('001100110101010110011101001011011000111111111110011010100001010100010011001100110100011011001110000111101111')],
|
|
[bitarray('111011101110011010100010000101110001000000000101000010001000011011111010111111011100010110100001011100110101'), bitarray('000001010111010110101101000111011010110111111100010110000001010100010001011001010001011111111110011111111011')],
|
|
[bitarray('110111101101010010000001010100110111001100100111010011011000000010011111110011111110010110100011011101010011'), bitarray('010100100101010011111101000011111001111011001100010010100011011100110111000001000111000010111010011110101111')],
|
|
[bitarray('010011101101110010000101011001000001000000110011110010000010111101100111111001101011100111000101010100100110'), bitarray('000101100111000010111000111000111110110101111000101011100110011101000100010000010001001111001100101100111110')],
|
|
[bitarray('110001001001101111000101001101000100010000010101000011001010101100101001000011000000111010100101010101010011'), bitarray('010101010110010001011010000100011100001111110010111110000111010100100010001100110001010000001011011000011000')],
|
|
[bitarray('000011000001110010100110001101100000000000100000011101011111000001001101000011010011111010100101000101000110'), bitarray('011101110100010000011010010100011000101100101011010111100101011000000100010001100110010000100101001110101011')],
|
|
[bitarray('110101011010101111000101011000100110001000110011000111111000111100101111101000001011011011000111000001000011'), bitarray('001000000001010000000111000111011001100100101011010111100110000001100111001000100011000001110000010111011011')],
|
|
[bitarray('101000001000011011100101000001000101010000000001000101110001011011001100111100010110010011000101010000100100'), bitarray('010101110011110011011000110110100111110011011111011010000011011101110101010001010001000111101111010111111111')],
|
|
[bitarray('110111001110010110100011010100110101000100100110001011011000001110001101110111011100010010100001000100010011'), bitarray('000100110000000110011110011110101011110101011000100111000101001001110001010100010001011111001101101000001101')],
|
|
[bitarray('111001001001101011100110010001110001000000100101011111011000111000101011101111010100000010010101110001110000'), bitarray('010101110000111111011010110100111001100101010011100111100010111101001111100110011001101000100110001100011111')],
|
|
[bitarray('101001001010100011000100110000001001000101111111001110000011010010000001101000000100110010000010001101000110'), bitarray('100001000001011101111100011111110001100000010100111111100001010100000100011110111010100100100111111110111011')],
|
|
[bitarray('101101011000001011100010000000110010001010111101011100010111111100100010110000111110000100000111010110001111'), bitarray('011010101001110011110000001101111001101100111010000101000001010111101001011011010111000110110001001110100111')],
|
|
[bitarray('100101111101001001010111001100111000000000000100110110001001011110001100110101101010000000000000011101011001'), bitarray('000001001110000110111001000001010111100000001110011101100000000101111011001111011001110110001011111001110111')],
|
|
[bitarray('110001001000000000000010000100011001001100111101010010001011000100010111111001001001010100000010001100110010'), bitarray('100110110101000101110000000010000001110101101010011001101010001110100111001110101111111111110001011001110000')],
|
|
[bitarray('110001101010010001101001000110000011000111101111110011000110011101100001100100101101000101101010010110010101'), bitarray('110110100010100010111100001000011011111100111000110101101100010000010111110101110011010100111100100110010001')],
|
|
[bitarray('101010000110011000101100110001100000111000110000111001011010100110100111111100101101101101011001111100110010'), bitarray('110100010011000011110110110100111010100100101011001001011001010100101001000100010010000100111101110100011000')],
|
|
[bitarray('101001101000011001100101001011001100001100111000001111110100110001101011111000000111111100100011000100001101'), bitarray('001101111000101111111101000111101001101100000011111001000111000101111110001100110000001110111100010000110010')],
|
|
[bitarray('101000101100001101000011000001110100110101010101100001110110100110010001110101001110001101001100111110100010'), bitarray('011110111110100101001010000110111111101001111001001011000011001100000100001110001000011001100010111100100110')],
|
|
[bitarray('101101101011000110000000010001000100101100100000111000111010010101111111101101011001000011000000010001000100'), bitarray('011111111010011101100001101001000001110010001100001010000110011001110000010011011001010010111100110000110010')],
|
|
[bitarray('101000000110111111100010001101100011001110101011101100100111110110011101100100110100111111100000000100100001'), bitarray('011010001100100000010100101110111011111001101100001010100101011000000110011110010101101101000010101110001100')],
|
|
[bitarray('110100101011110000011010100010110100011111010100010010000111100011000111101100111000101001001000000011000011'), bitarray('001110111100101001001010100011010111111100111000111001100010100000010100101110001000101100110001100101010111')],
|
|
[bitarray('101101111100101100000101011111110110110101000101100110100101110100111101111111100111000101100000011011101101'), bitarray('011110011101000011000110100100110111110110000100001101000111001011110010110111011101010001001010011000001010')],
|
|
[bitarray('100110100100001000100001010000111011001001110101010010111001111111110011111110010001001001100110010101101010'), bitarray('001000101100110110001111111001011001100110110001001100000010001111010110111010000001110100111100011110110011')],
|
|
[bitarray('101010010101101001100011001011100101111100010100000011100111001100010001100010010110100000000000001010110011'), bitarray('000010001000111110001110101101101110101111001001010111100111010100000010001100011111100010001011010101110110')],
|
|
[bitarray('100000011101111010100110001001100101010110110010110010101010001100011001101000100010011110000011011101010000'), bitarray('010001001100001111111101111101111001111100010101011111100101011100010110011101000111101111001010110010010011')],
|
|
[bitarray('011000001000000011101000111100101110101110111000001101010000111001101010100010010100011010100001111101100001'), bitarray('011111011101111010111111010110000100101110011011001011100001011101110011001110100000101111111000111110011111')],
|
|
[bitarray('101110111000001011100000011101100100010111010000100110001101101011001111110000111110010010100011000001000000'), bitarray('011000011000110001010110000101000011111100001100010010000010000001000010010101001101111100000100010000110011')],
|
|
[bitarray('101000001000011011000101000001000010000101100011000100010011011111011001111011101100011110000011010101010011'), bitarray('001100010101011011001001001010111101111011011101011110000011001100010011010101100011010110111111000011011101')],
|
|
[bitarray('111111001100010010000001001100010101000000110100000011001110011111011001101111010010010110100001000100110000'), bitarray('010000110100110101000110110111000101000100111101011010101011000111010000010100010010000001011001000100001111')],
|
|
[bitarray('100011000001010010000011001100100000000000010001111000110100100110000100101011100000010110000001011101000100'), bitarray('011001100101101101010011101110100010110001101000101011000101010001010011001000110101010110111101101100101111')],
|
|
[bitarray('110101011000101011100101010001010001010000110000011111001001100000011111110101001011100011000101010001010111'), bitarray('000000110101000111011010100100111110111001101001101111000111001000010111011101100011001110001100111100111001')],
|
|
[bitarray('000010000010011011000011010010010011000101110101000110111001000010000101111001011000100011100110010001010011'), bitarray('000100010111010110111011100000011111111101101000101111100111001000010001010001100100001110011100101000111111')],
|
|
[bitarray('110001111001101111000111000100000111010101110010000011011111101101111101101100011100111110100101000101000001'), bitarray('001111000100100011001010011101001101010110101011100011011001000100101111010000010001111011010111111000001111')]
|
|
],
|
|
'connected': [
|
|
[bitarray('111001011000100011000101010001010001010001000011011110011011101001001100111010000010100010100001001001110100'), bitarray('010101010100110010001010010101110010111011101101010110000001010101010101011001010001000110001000011110111010')],
|
|
[bitarray('110111101110010010100001001101010001010001010011010011011100011011101111111011011101011110000001000101110101'), bitarray('001000100010000111111100001011111011110011101100010010000000011101010011010101110101011010001101010011011110')],
|
|
[bitarray('110111001101010110100011000100110001001100010110000110111010011010101000111011001110011010100011001101110111'), bitarray('000100110100001110011000001110101110111101011000100111100101011001110011011000010000011011011001100101001111')],
|
|
[bitarray('111101011010100111100101000000010101001001010111000010001011110100111011111001001011100011000111010000110111'), bitarray('010101010001001010011100101101101111110001111000100011100111000000010011001000010101010111001111101000111011')],
|
|
[bitarray('100011010011111010000100110000001101010011110010100111000101011101010100110001001001110111001001111001111110'), bitarray('111101010100101101101110110100011011100100001110110001111101111011110000001111001101110011010111100000001111')],
|
|
[bitarray('101101101101110101011101000100101000100111010101010111111001111001011111110001111000101000000001000111110001'), bitarray('010110010101111011101101000110001100110010100000011000101100010010010110001111111001001111000000100001101001')],
|
|
[bitarray('110110000000011100001100010011110101011010111001011111010001100001011001100110000001010001010011001111111001'), bitarray('101110010101010111101100111001001110110010100111101001110100000000101010110101010111100100011111011011110110')],
|
|
[bitarray('110011000000100000000001011011101000001101111101100101001011110011010111100010110101111001100011000010101100'), bitarray('010111011000010101001111011111110010101111010100100001000101001011001111011000000001010000001110111100101011')],
|
|
[bitarray('100110110100101000100101110000010100010011000100001001111000010001000110000011111000000010101110101110110101'), bitarray('000100101001100101001001011100101001110110100011010010110110111000110011101100001000101010000110110100000000')],
|
|
[bitarray('100011110001010110000011011101110101010100010111100100100011101110110111100000001000011011100111010001000010'), bitarray('001101110001010100110010001111111100111000101101010110110000011000100000010101001010100101010000000101110100')],
|
|
[bitarray('110100101010101110110111100110011010000011010110001011011010011101000111001101000001101111011000010111010101'), bitarray('100011011100011000100011110111111111111011100110011001011110110011110111101111111000110000110011101001100110')],
|
|
[bitarray('100111100100111001001110001001000101100001001001000100101100011101100110110110100110110001100101001001110110'), bitarray('011111001000111110110101010101000010101110000111100100100111110000110001010110100100011001111101011001100011')],
|
|
[bitarray('111011101100010110100001001100010111000001000110000011011000000011011011100111111011011011100111001101010111'), bitarray('001000001001100011111101010100110101001011101110001011001110111101111101011100010111100110110001011100100010')],
|
|
[bitarray('110111100000110010000111000000000111000011011000100010001110100110001110110111100000110010000110011000100011'), bitarray('011110001110110010001001100011011010111110100110000011100001001000010100000011100101001000000001011111000011')],
|
|
[bitarray('110011000100011011000100000000110110000001001111000100010101110001011111101011110010011010000001001000010010'), bitarray('011100110001111000110111101110000001111011101111011110100011011100010101000101010101011110011000011011101010')],
|
|
[bitarray('000110010010010011100011011011000010010100000011000010111101010011000100111101001001100111100111011000010111'), bitarray('001100010101000010001100110100111001110001101001100011000101011100110101000000010101000111011010101100101101')],
|
|
[bitarray('111001111000100111100111011101110011010101010000011110001100100100101111100011110000011110100011001001010000'), bitarray('000100110000110100000101110111100111001101000000101110001011011011010010001001110010110001101111011110010001')],
|
|
[bitarray('111101111000101011000100011001010011011101000000011110011100100001111010111001101011101011100101001000010111'), bitarray('011000110001000011001111101000011101111101111010100111000101000000000001001000000001011111011010110100001001')],
|
|
[bitarray('110001001010101111000111011000100101001100100010010111101100101001111010110101111000101011000101000000100011'), bitarray('000100010100010011011111101101111111110001001001101111000100000000010000000101110011011010001111100100011100')],
|
|
[bitarray('111111001101011010100001001100110001001100000001001010111100010111011010110011111100011010100011001101010101'), bitarray('001101100100001110001100001110111100111111001101011110000011000101010111011101110001000110011011010011011010')],
|
|
[bitarray('110011101100010010000000011101010101010101000011000011101000001111111110110010000011101110100001000001110000'), bitarray('001000010011110110111111000001110111111110010000100010100001011000110001011100000110111110011100011100010001')],
|
|
[bitarray('110111001101010010000011000101110001011100100001010011001010010011101011111011111110011010000001001100110001'), bitarray('000000000001001010001011001110001100001101001111101111001110001101111111111011011101000100010101000101100110')],
|
|
[bitarray('100111111000011111000101011100110001000001011110110010111000011001010001100001010010110011010011100100100111'), bitarray('011000010100100011001000011111101101001000100000000000000010000001000000001000100000010000000100010000000000')]
|
|
]
|
|
}
|