It is currently Thu Feb 23, 2017 8:46 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 152 posts ]  Go to page 1, 2, 3, 4, 5 ... 16  Next
Author Message
 Post subject: Calorie Confessor Food Diary
Unread postPosted: Mon Jul 20, 2015 12:07 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
http://laughton.com/basic/programs/appl ... d%20Diary/

Oh well, this program hasn't overtaken Lose It! or Myfitnesspal on my Play page as I'd hoped :D , so I thought I'd throw it out
in the public domain..

It's a Google Speech based calorie counting app. I have been using it for a couple months and I've found it pretty handy
for watching my diet.

It may take some getting used to using the commands.. I tried to choose words that google speech to text wouldn't confuse too much. Also
google speech recognition might take some time to train on your voice (you also need an active Wifi or mobile internet connection to use it)

I think the coolest feature it has is that is autoexits pretty fast. (you can also turn autoexit off if you want to loop) This way
you can quickly enter your food on the go.

See the help file or say HELP for the list of commands.

It will also graph your weight, daily calories and has an archive function to display most frequent foods.

There are probably a lot of things that can be done more efficiently so if anyone spots some better ways to do things let me know.


Attachments:
2015-07-20 19.06.14.png
2015-07-20 19.06.14.png [ 48.98 KiB | Viewed 4596 times ]
2015-07-01 09.26.55.png
2015-07-01 09.26.55.png [ 68.3 KiB | Viewed 4596 times ]


Last edited by cterp on Sat Sep 10, 2016 6:56 pm, edited 1 time in total.
Report this post
Top
 Profile  
 
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Mon Jul 20, 2015 12:19 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
Here is a demo of it once it's been trained...

https://www.youtube.com/watch?v=FL9JQn9r2PU


The commands have changed slightly since this demo was recorded.. TARGET records the calorie goal
And LOG WEIGht records weight.


Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Wed Jul 22, 2015 7:19 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1079
I watched the video.

That's pretty good I think because it is quick simple entry method, goes straight back to the home page too and easy to update with info from Google. In an all automated way...coool.

Glad you gave up the donuts though!

I wonder if adding a TTS option for a user on the move?

Imagine let's say the user has a headset and is ordering a McDonald's; Big Mac, Large Fries, Strawberry Milkshake, Apple Pie... Listen in horror as the calories add up! ..Then cancel, order a side-salad...

(I wonder if one day we could interface BASIC! with a SmartWatch one day? BASIC! for Android Wear? I've been tempted to put that on the 'Enhancement List' but there's heaps already there!)

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Wed Jul 22, 2015 9:36 am 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
Thanks Mog--

I thought TTS was a cool idea... Right now I just added it in to announce the calories left.
You can say SPEECH ON or SPEECH OFF to turn the mode on/off.

Not sure if there is an easy way I could launch the program from Bluetooth... I could
have it always running in the background I suppose and maybe look for some kind of Bluetooth signal..

I would just hope people don't mess around with it if they are driving :shock:


Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Wed Jul 22, 2015 10:17 am 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
I uploaded the new .bas and .apk..

The TTS has a slight delay probably from TTS.INIT.. Not too big a deal but it slows down the food entry loop.
Is there any way to speed up the time from launch to speaking?


Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Wed Jul 22, 2015 4:55 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
Actually I just moved the TTS.INIT to a place where the delay isn't as noticeable..

Seems fairly decent speed now..


Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Fri Jul 24, 2015 7:36 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
Today I moved a bunch of GOSUB subroutines back into functions...
Also just including the help right inside the .bas file. It would just get loaded anyway.
Also reduced the font size in the .apk This way one day of food should fit on the screen for most people.

Next I might try adding a bunch of LET statements to speed things up even more.

Still not sure why TTS.INIT seems to really slow the program down drastically.


Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Sat Jul 25, 2015 5:40 pm 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
I am thinking about displaying the diary as HTML .. it seems to launch and exit fast enough, plus the table formatting would be nice
I am still new at this so I don't know if there is a relatively easy way to implement ONCONSOLETOUCH with html...
Ideally I would like to exit the HTML by tapping the screen anywhere like I do in console mode.


Attachments:
2015-07-26 00.28.29.png
2015-07-26 00.28.29.png [ 72.97 KiB | Viewed 4260 times ]
Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Tue Jul 28, 2015 3:31 am 
Offline

Joined: Wed Apr 15, 2015 3:57 am
Posts: 402
Yesterday I tried to optimize the code a bit... Also now you can view your daily food log by tapping the speech cancel button.


Report this post
Top
 Profile  
 
 Post subject: Re: Calorie Confessor Food Diary
Unread postPosted: Tue Jul 28, 2015 7:27 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1079
Quote:
Still not sure why TTS.INIT seems to really slow the program down drastically.


Yeah, I just noticed that in a program I was working on. It seems to not execute the next line until the speech has been spoken.

I don't know if that's a BASIC! thing or an Android one.

I've posted a topic here about it, if you don't mind...

tts-delay-t3555.html

Mog


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 152 posts ]  Go to page 1, 2, 3, 4, 5 ... 16  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred