Commit 799cd65f authored by André Anjos's avatar André Anjos 💬

xbob -> bob

parent 9df3da68
......@@ -31,8 +31,8 @@ install:
- "python bootstrap.py"
- "CFLAGS=-coverage ./bin/buildout"
script:
- "./bin/python -c 'from xbob.ap import get_config; print(get_config())'"
- "./bin/coverage run --source=xbob.ap ./bin/nosetests -sv"
- "./bin/python -c 'from bob.ap import get_config; print(get_config())'"
- "./bin/coverage run --source=bob.ap ./bin/nosetests -sv"
- "./bin/sphinx-build -b doctest doc sphinx"
- "./bin/sphinx-build -b html doc sphinx"
after_success:
......
include LICENSE README.rst bootstrap.py buildout.cfg
recursive-include doc conf.py *.rst
recursive-include xbob *.cpp
recursive-include xbob/ap/data *.wav
recursive-include bob *.cpp
recursive-include bob/ap/data *.wav
......@@ -2,16 +2,16 @@
.. Andre Anjos <andre.anjos@idiap.ch>
.. Thu 30 Jan 08:46:53 2014 CET
.. image:: https://travis-ci.org/bioidiap/xbob.ap.svg?branch=master
:target: https://travis-ci.org/bioidiap/xbob.ap
.. image:: https://coveralls.io/repos/bioidiap/xbob.ap/badge.png
:target: https://coveralls.io/r/bioidiap/xbob.ap
.. image:: http://img.shields.io/github/tag/bioidiap/xbob.ap.png
:target: https://github.com/bioidiap/xbob.ap
.. image:: http://img.shields.io/pypi/v/xbob.ap.png
:target: https://pypi.python.org/pypi/xbob.ap
.. image:: http://img.shields.io/pypi/dm/xbob.ap.png
:target: https://pypi.python.org/pypi/xbob.ap
.. image:: https://travis-ci.org/bioidiap/bob.ap.svg?branch=master
:target: https://travis-ci.org/bioidiap/bob.ap
.. image:: https://coveralls.io/repos/bioidiap/bob.ap/badge.png
:target: https://coveralls.io/r/bioidiap/bob.ap
.. image:: http://img.shields.io/github/tag/bioidiap/bob.ap.png
:target: https://github.com/bioidiap/bob.ap
.. image:: http://img.shields.io/pypi/v/bob.ap.png
:target: https://pypi.python.org/pypi/bob.ap
.. image:: http://img.shields.io/pypi/dm/bob.ap.png
:target: https://pypi.python.org/pypi/bob.ap
=============================
Python bindings for bob.ap
......@@ -42,7 +42,7 @@ Testing
You can run a set of tests using the nose test runner::
$ nosetests -sv xbob.ap
$ nosetests -sv bob.ap
.. warning::
......@@ -59,7 +59,7 @@ You can run our documentation tests using sphinx itself::
You can test overall test coverage with::
$ nosetests --with-coverage --cover-package=xbob.ap
$ nosetests --with-coverage --cover-package=bob.ap
The ``coverage`` egg must be installed for this to work properly.
......
......@@ -5,11 +5,11 @@
* @brief Bindings to the base class bob::ap::Ceps
*/
#include <xbob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h>
#include <bob.blitz/cppapi.h>
#include <bob.blitz/cleanup.h>
#include "types.h"
PyDoc_STRVAR(s_ceps_str, XBOB_EXT_MODULE_PREFIX ".Ceps");
PyDoc_STRVAR(s_ceps_str, BOB_EXT_MODULE_PREFIX ".Ceps");
PyDoc_STRVAR(s_ceps_doc,
"Ceps(sampling_frequency, [win_length_ms=20., [win_shift_ms=10., [n_filters=24, [n_ceps=19, [f_min=0., [f_max=4000., [delta_win=2, [pre_emphasis_coeff=0.95, [mel_scale=True, [dct_norm=True]]]]]]]]]]) -> new Ceps\n\
......
......@@ -5,11 +5,11 @@
* @brief Bindings to the base class bob::ap::Energy
*/
#include <xbob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h>
#include <bob.blitz/cppapi.h>
#include <bob.blitz/cleanup.h>
#include "types.h"
PyDoc_STRVAR(s_energy_str, XBOB_EXT_MODULE_PREFIX ".Energy");
PyDoc_STRVAR(s_energy_str, BOB_EXT_MODULE_PREFIX ".Energy");
PyDoc_STRVAR(s_energy_doc,
"Energy(sampling_frequency, [win_length_ms=20., [win_shift_ms=10.]]) -> new Energy\n\
......
......@@ -5,11 +5,11 @@
* @brief Bindings to the base class bob::ap::FrameExtractor
*/
#include <xbob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h>
#include <bob.blitz/cppapi.h>
#include <bob.blitz/cleanup.h>
#include "types.h"
PyDoc_STRVAR(s_frame_extractor_str, XBOB_EXT_MODULE_PREFIX ".FrameExtractor");
PyDoc_STRVAR(s_frame_extractor_str, BOB_EXT_MODULE_PREFIX ".FrameExtractor");
PyDoc_STRVAR(s_frame_extractor_doc,
"FrameExtractor(sampling_frequency, [win_length_ms=20., [win_shift_ms=10.]]) -> new FrameExtractor\n\
......
......@@ -8,8 +8,8 @@
#ifdef NO_IMPORT_ARRAY
#undef NO_IMPORT_ARRAY
#endif
#include <xbob.blitz/capi.h>
#include <xbob.blitz/cleanup.h>
#include <bob.blitz/capi.h>
#include <bob.blitz/cleanup.h>
#include "types.h"
static PyMethodDef module_methods[] = {
......@@ -21,7 +21,7 @@ PyDoc_STRVAR(module_docstr, "Bob audio processing toolkit");
#if PY_VERSION_HEX >= 0x03000000
static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT,
XBOB_EXT_MODULE_NAME,
BOB_EXT_MODULE_NAME,
module_docstr,
-1,
module_methods,
......@@ -46,12 +46,12 @@ static PyObject* create_module (void) {
# if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition);
# else
PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr);
PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr);
# endif
if (!m) return 0;
auto m_ = make_safe(m); ///< protects against early returns
if (PyModule_AddStringConstant(m, "__version__", XBOB_EXT_MODULE_VERSION) < 0)
if (PyModule_AddStringConstant(m, "__version__", BOB_EXT_MODULE_VERSION) < 0)
return 0;
/* register the types to python */
......@@ -67,15 +67,15 @@ static PyObject* create_module (void) {
Py_INCREF(&PyBobApCeps_Type);
if (PyModule_AddObject(m, "Ceps", (PyObject *)&PyBobApCeps_Type) < 0) return 0;
/* imports xbob.blitz C-API + dependencies */
if (import_xbob_blitz() < 0) return 0;
/* imports bob.blitz C-API + dependencies */
if (import_bob_blitz() < 0) return 0;
Py_INCREF(m);
return m;
}
PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) {
PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
# if PY_VERSION_HEX >= 0x03000000
return
# endif
......
......@@ -5,11 +5,11 @@
* @brief Bindings to the base class bob::ap::Spectrogram
*/
#include <xbob.blitz/cppapi.h>
#include <xbob.blitz/cleanup.h>
#include <bob.blitz/cppapi.h>
#include <bob.blitz/cleanup.h>
#include "types.h"
PyDoc_STRVAR(s_spectrogram_str, XBOB_EXT_MODULE_PREFIX ".Spectrogram");
PyDoc_STRVAR(s_spectrogram_str, BOB_EXT_MODULE_PREFIX ".Spectrogram");
PyDoc_STRVAR(s_spectrogram_doc,
"Spectrogram(sampling_frequency, [win_length_ms=20., [win_shift_ms=10., [n_filters=24, [f_min=0., [f_max=4000., [pre_emphasis_coeff=0.95, [mel_scale=True]]]]]]]) -> new Spectrogram\n\
......
......@@ -8,7 +8,7 @@ import os
import numpy
import pkg_resources
from xbob.sp import fft
from bob.sp import fft
from . import Ceps
from .test_utils import *
......
......@@ -10,7 +10,7 @@ import math
import numpy
import scipy.io.wavfile
from xbob.sp import fft
from bob.sp import fft
def read(filename):
"""Read video.FrameContainer containing preprocessed frames"""
......
......@@ -5,8 +5,8 @@
* @brief All types that need cross-compilation on different units
*/
#ifndef XBOB_AP_TYPES_H
#define XBOB_AP_TYPES_H
#ifndef BOB_AP_TYPES_H
#define BOB_AP_TYPES_H
#include <bob/ap/FrameExtractor.h>
#include <bob/ap/Energy.h>
......@@ -53,4 +53,4 @@ typedef struct {
extern PyTypeObject PyBobApCeps_Type; //forward declaration
#endif /* XBOB_AP_TYPES_H */
#endif /* BOB_AP_TYPES_H */
......@@ -19,8 +19,8 @@
#ifdef NO_IMPORT_ARRAY
#undef NO_IMPORT_ARRAY
#endif
#include <xbob.blitz/capi.h>
#include <xbob.blitz/cleanup.h>
#include <bob.blitz/capi.h>
#include <bob.blitz/cleanup.h>
static int dict_set(PyObject* d, const char* key, const char* value) {
PyObject* v = Py_BuildValue("s", value);
......@@ -96,10 +96,10 @@ static PyObject* numpy_version() {
}
/**
* xbob.blitz c/c++ api version
* bob.blitz c/c++ api version
*/
static PyObject* xbob_blitz_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(XBOB_BLITZ_API_VERSION));
static PyObject* bob_blitz_version() {
return Py_BuildValue("{ss}", "api", BOOST_PP_STRINGIZE(BOB_BLITZ_API_VERSION));
}
static PyObject* build_version_dictionary() {
......@@ -113,7 +113,7 @@ static PyObject* build_version_dictionary() {
if (!dict_steal(retval, "Compiler", compiler_version())) return 0;
if (!dict_steal(retval, "Python", python_version())) return 0;
if (!dict_steal(retval, "NumPy", numpy_version())) return 0;
if (!dict_steal(retval, "xbob.blitz", xbob_blitz_version())) return 0;
if (!dict_steal(retval, "bob.blitz", bob_blitz_version())) return 0;
if (!dict_steal(retval, "Bob", bob_version())) return 0;
Py_INCREF(retval);
......@@ -131,7 +131,7 @@ PyDoc_STRVAR(module_docstr,
#if PY_VERSION_HEX >= 0x03000000
static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT,
XBOB_EXT_MODULE_NAME,
BOB_EXT_MODULE_NAME,
module_docstr,
-1,
module_methods,
......@@ -144,27 +144,27 @@ static PyObject* create_module (void) {
# if PY_VERSION_HEX >= 0x03000000
PyObject* m = PyModule_Create(&module_definition);
# else
PyObject* m = Py_InitModule3(XBOB_EXT_MODULE_NAME, module_methods, module_docstr);
PyObject* m = Py_InitModule3(BOB_EXT_MODULE_NAME, module_methods, module_docstr);
# endif
if (!m) return 0;
auto m_ = make_safe(m); ///< protects against early returns
/* register version numbers and constants */
if (PyModule_AddStringConstant(m, "module", XBOB_EXT_MODULE_VERSION) < 0)
if (PyModule_AddStringConstant(m, "module", BOB_EXT_MODULE_VERSION) < 0)
return 0;
PyObject* externals = build_version_dictionary();
if (!externals) return 0;
if (PyModule_AddObject(m, "externals", externals) < 0) return 0;
if (import_xbob_blitz() < 0) return 0;
if (import_bob_blitz() < 0) return 0;
Py_INCREF(m);
return m;
}
PyMODINIT_FUNC XBOB_EXT_ENTRY_NAME (void) {
PyMODINIT_FUNC BOB_EXT_ENTRY_NAME (void) {
# if PY_VERSION_HEX >= 0x03000000
return
# endif
......
......@@ -4,25 +4,25 @@
[buildout]
parts = scripts
eggs = xbob.ap
extensions = xbob.buildout
eggs = bob.ap
extensions = bob.buildout
mr.developer
auto-checkout = *
develop = src/xbob.extension
src/xbob.blitz
src/xbob.sp
develop = src/bob.extension
src/bob.blitz
src/bob.sp
.
; options for xbob.buildout extension
; options for bob.buildout extension
debug = true
verbose = true
prefixes = /idiap/group/torch5spro/nightlies/last/bob/linux-x86_64-release
/Users/andre/work/bob/b/dbg/
[sources]
xbob.extension = git https://github.com/bioidiap/xbob.extension branch=prototype
xbob.blitz = git https://github.com/bioidiap/xbob.blitz
xbob.sp = git https://github.com/bioidiap/xbob.sp
bob.extension = git https://github.com/bioidiap/bob.extension
bob.blitz = git https://github.com/bioidiap/bob.blitz
bob.sp = git https://github.com/bioidiap/bob.sp
[scripts]
recipe = xbob.buildout:scripts
recipe = bob.buildout:scripts
......@@ -58,12 +58,12 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'xbob.ap'
project = u'bob.ap'
import time
copyright = u'%s, Idiap Research Institute' % time.strftime('%Y')
# Grab the setup entry
distribution = pkg_resources.require('xbob.ap')[0]
distribution = pkg_resources.require('bob.ap')[0]
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
......@@ -129,7 +129,7 @@ if sphinx.__version__ >= "1.0":
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = 'xbob_ap'
#html_short_title = 'bob_ap'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
......@@ -187,7 +187,7 @@ html_favicon = 'img/favicon.ico'
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'xbob_ap_doc'
htmlhelp_basename = 'bob_ap_doc'
# -- Options for LaTeX output --------------------------------------------------
......@@ -201,7 +201,7 @@ latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'xbob_ap.tex', u'Bob Audio Processing Routines',
('index', 'bob_ap.tex', u'Bob Audio Processing Routines',
u'Biometrics Group, Idiap Research Institute', 'manual'),
]
......@@ -241,7 +241,7 @@ rst_epilog = """
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'xbob_ap', u'Bob Audio Processing Documentation', [u'Idiap Research Institute'], 1)
('index', 'bob_ap', u'Bob Audio Processing Documentation', [u'Idiap Research Institute'], 1)
]
# Default processing flags for sphinx
......
......@@ -8,12 +8,12 @@
import sys
import math
import numpy
import xbob.ap
import bob.ap
import scipy.io.wavfile
from pkg_resources import resource_filename
wave_path = resource_filename('xbob.ap', os.path.join('data', 'sample.wav'))
wave_path = resource_filename('bob.ap', os.path.join('data', 'sample.wav'))
sys.stdout = open(os.devnull, 'w')
rate, signal = scipy.io.wavfile.read(str(wave_path))
......@@ -66,7 +66,7 @@ LFCC and MFCC Extraction
~~~~~~~~~~~~~~~~~~~~~~~~
The LFCC and MFCC coefficients can be extracted from a audio signal by using
:py:func:`xbob.ap.Ceps`. To do so, several parameters can be precised by the
:py:func:`bob.ap.Ceps`. To do so, several parameters can be precised by the
user. Typically, these are precised in a configuration file. The following
values are the default ones:
......@@ -84,13 +84,13 @@ values are the default ones:
>>> dct_norm = True # A factor by which the cepstral coefficients are multiplied
>>> mel_scale = True # Tell whether cepstral features are extracted on a linear (LFCC) or Mel (MFCC) scale
Once the parameters are precised, :py:func:`xbob.ap.Ceps` can be called as
Once the parameters are precised, :py:func:`bob.ap.Ceps` can be called as
follows:
.. doctest:: aptest
:options: +NORMALIZE_WHITESPACE
>>> c = xbob.ap.Ceps(rate, win_length_ms, win_shift_ms, n_filters, n_ceps, f_min, f_max, delta_win, pre_emphasis_coef, mel_scale, dct_norm)
>>> c = bob.ap.Ceps(rate, win_length_ms, win_shift_ms, n_filters, n_ceps, f_min, f_max, delta_win, pre_emphasis_coef, mel_scale, dct_norm)
>>> signal = numpy.cast['float'](signal) # vector should be in **float**
>>> mfcc = c(signal)
>>> print(len(mfcc))
......
......@@ -6,8 +6,8 @@
Python API
============
This section includes information for using the pure Python API of ``xbob.ap``.
This section includes information for using the pure Python API of ``bob.ap``.
.. automodule:: xbob.ap
.. automodule:: bob.ap
......@@ -4,18 +4,18 @@
# Thu 30 Jan 08:45:49 2014 CET
from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['xbob.blitz']))
from xbob.blitz.extension import Extension
dist.Distribution(dict(setup_requires=['bob.blitz']))
from bob.blitz.extension import Extension
packages = ['bob-ap >= 1.2.2']
version = '2.0.0a0'
setup(
name='xbob.ap',
name='bob.ap',
version=version,
description='Bindings for Bob\'s audio processing utilities',
url='http://github.com/bioidiap/xbob.ap',
url='http://github.com/bioidiap/bob.ap',
license='BSD',
author='Andre Anjos',
author_email='andre.anjos@idiap.ch',
......@@ -27,30 +27,30 @@ setup(
install_requires=[
'setuptools',
'xbob.blitz',
'xbob.sp', # for testing
'bob.blitz',
'bob.sp', # for testing
'scipy', # for testing
],
namespace_packages=[
"xbob",
"bob",
],
ext_modules = [
Extension("xbob.ap.version",
Extension("bob.ap.version",
[
"xbob/ap/version.cpp",
"bob/ap/version.cpp",
],
packages = packages,
version = version,
),
Extension("xbob.ap._library",
Extension("bob.ap._library",
[
"xbob/ap/energy.cpp",
"xbob/ap/frame_extractor.cpp",
"xbob/ap/spectrogram.cpp",
"xbob/ap/ceps.cpp",
"xbob/ap/main.cpp",
"bob/ap/energy.cpp",
"bob/ap/frame_extractor.cpp",
"bob/ap/spectrogram.cpp",
"bob/ap/ceps.cpp",
"bob/ap/main.cpp",
],
packages = packages,
version = version,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment