Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
moving from tkinter to wxpython
Thanks. Cloned and ran KJ_BibleApp.py.
Am I missng something? Is it supposed to say the Names of the books anf chapters at the mouse hovers over them yet? Is it because of differences between WIndows and Linux?
I did
python3.6 RunMeOnce.py
python3.6 KJ_BibleApp.py
Which produced no sound so I tried
python3.6 ScrapeAudio.py
python3.6 UpdateBibleIndexAudioLinks.py
and then ran
python3.6 KJ_BibleApp.py
But still no sound.
There is no sound, I fixed another problem that I had encountered, and also had to
work on another project for a few days.

The sound files are there, but not hooked in yet. I thought that the text should also
be shown at the same time since it's all there.

Almost all of this time (from the start) has been taken up on creating the dictionary that's loaded in
with this code:
        with self.bpath.IndexedBible.open() as f:
            self.bible = json.load(f)
at the beginning of the KJ_BibleApp.py program, and stored in the file: data/json/IndexedBible.json
I'm looking for a better way to play audio, but for now will proceed with pygame.mixer.
I have a post which may bring some alternatives.
here's the simple test:
import BiblePaths
from pygame import mixer
import json
import os

class PlayAudio:
    def __init__(self):
        self.bpath = BiblePaths.BiblePaths()

        with self.bpath.IndexedBible.open() as f:
            self.bible = json.load(f)

    def play_chapter(self, volume, book, chapter):
        mp3loc = self.bible[volume][book][chapter]['mp3path']
        # found a bug, this is a hack until I fix the create program
        mp3loc[1] = str(mp3loc[1]).replace(' ', '_')
        mp3path = self.bpath.KingJamesAudiopath / mp3loc[0] / mp3loc[1]
        newpath = (mp3path.resolve()).as_posix()

        results = mixer.music.play()
        print('Press enter to quit')

def testit():
    pa = PlayAudio()
    pa.play_chapter('Old Testament', 'Jeremiah', '45')

if __name__ == '__main__':
At this point, I am done for now.

Code is working to the extent that you can play the audio for any book, any chapter using the GUI
The repository has been reverted back to Barrowman and several programs have been changed.
(So, regretfully needs to be cloned once more)

Known issues:
  • There is a bug associated with linking mp3 file names (somewhere in UpdateBibleIndexAudioLinks)
  • There is a hack in two programs to accommodate the bug PlayAudio and KJ_BibleApp
  • No scroll bats on Notebook pages, causing issue with Pslams (150 chapters) need to replace all notebook page panels with scrolledpanels.
To be done:
  • Add scrollbars to notebook pages
  • change License copyright owner to you (except for several modules that I copied from my other projects) PM me about this.
  • Add a page for viewing text along with audio (text is already there, just needs to be displayed)
  • Add speech recognition for navigation to make this really usable by the blind.
  • If you plan to make a commercial product, permissions are needed by text audio suppliers (again PM me)

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  how to draw simple line in wxPython? Sebastian_Adil 6 55 2 hours ago
Last Post: Larz60+
  installing wxPython predirt 12 228 Mar-16-2018, 09:45 PM
Last Post: Barrowman
  [WxPython] wxpython and python 3.6 on linux Barrowman 3 88 Mar-15-2018, 06:57 PM
Last Post: Larz60+
  moving from os to subprocess Barrowman 10 371 Dec-20-2017, 09:08 AM
Last Post: Barrowman
  WxPython Line Number QueenSvetlana 0 173 Dec-14-2017, 03:42 AM
Last Post: QueenSvetlana
  wxPython wxListBox Contains QueenSvetlana 1 183 Nov-11-2017, 04:12 PM
Last Post: snippsat
  wxPython QueenSvetlana 1 259 Oct-31-2017, 09:24 PM
Last Post: snippsat
  Multiple screen in wxpython for my cluster djdan_23 0 179 Oct-30-2017, 09:31 PM
Last Post: djdan_23
  wxPython install on raspberry pi3 and python 3.6.2. djdan_23 3 1,060 Sep-13-2017, 11:49 AM
Last Post: Larz60+
  Building Standalone desktop GUI app with wxpython manoj_nike15 1 631 Jul-26-2017, 07:46 AM
Last Post: buran

Forum Jump:

Users browsing this thread: 1 Guest(s)