Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Praat on iOS and Android #629

Closed
jl-DaDar opened this issue Jul 27, 2018 · 5 comments
Closed

Use Praat on iOS and Android #629

jl-DaDar opened this issue Jul 27, 2018 · 5 comments

Comments

@jl-DaDar
Copy link

How do I do that?
Can someone please provide guidance? Thanks.

@PaulBoersma
Copy link
Member

you cannot. Praat relies too much on menus, windows and files to be usable on those platforms.

@namanmaheshwari97
Copy link

@jl-DaDar You could use Parselmouth, which is basically Praat in Python.

You could then use Flask to create an API for all the information you need (pitch, intensity, etc.)

@sogaiu
Copy link

sogaiu commented Oct 17, 2022

I had some success building and running praat on Android via termux + vnc. It's not the most convenient setup to use for sure, but perhaps better than nothing when there is no access to an appropriate pc.

I'll try to put together detailed instructions later, but roughly what worked here was:

  • install appropriate dependencies
  • make a symlink so soundcard.h was appropriately visisble
  • use a modified makefile.defs (included below)
# File: makefile.defs.linux.termux

# System: Android via termux

CC ?= gcc
CXX ?= g++
LINK ?= g++

PKG_CONFIG ?= "pkg-config"

COMMONFLAGS = -D_FILE_OFFSET_BITS=64 -DUNIX -Dlinux -DHAVE_PULSEAUDIO `$(PKG_CONFIG) --cflags gtk+-3.0` \
	-Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -pthread

CFLAGS = -std=gnu99 $(COMMONFLAGS) -Werror=missing-prototypes -Werror=implicit

CXXFLAGS = -std=c++17 $(COMMONFLAGS) -Wshadow

EXECUTABLE = praat

LIBS = `$(PKG_CONFIG) --libs gtk+-3.0` -lm -lpulse -lpthread

AR = ar
RANLIB = ls
ICON =
MAIN_ICON =

@sogaiu
Copy link

sogaiu commented Oct 20, 2022

The following gist contains detailed steps for setting things up on an Android [1] device to use praat: https://gist.github.com/sogaiu/89babbaa7b2a44db4ca549b5dca3b1a1

I've also made a PR to the termux-packages project to add praat as a package in the hopes that setup can be simplified: termux/termux-packages#12447

One caveat for usage here has been that recording of audio does not work. I'm not sure why this is but possibly the following has something to do with it:

Of course, ALSA in Termux will not have direct access to sound hardware on an Android device unless rooted and the vendor uses an ALSA driver in the kernel.

via: termux/termux-packages#821 (comment)

As a work-around I've just been recording audio via other means on phones and tablets and just opening those. That seems to work fine.


[1] Android 12 might be a bit troublesome to get working reliably, but with a small amount of tweaking, 12L seems to be working fine. IIUC, versions 11 and below (through 7 AFAIU) may work ok and 13 allegedly works via some tweaking too.

@sogaiu
Copy link

sogaiu commented Nov 1, 2022

FYI, the PR to the termux-packages repository has been merged: termux/termux-packages#12447

I've been using praat on Android on a tablet using this method for some days now. As mentioned before, recording of audio doesn't work, but opening audio files and visualizing them seems to be working ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants