changeset 48:117856eabb9e

doc update
author Amine SEHILI <amine.sehili@gmail.com>
date Sun, 06 Mar 2016 14:56:06 +0100
parents a92dfdc1c612
children 809df9157e1a
files auditok/io.py doc/apitutorial.rst doc/conf.py
diffstat 3 files changed, 7 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/auditok/io.py	Sun Mar 06 14:54:52 2016 +0100
+++ b/auditok/io.py	Sun Mar 06 14:56:06 2016 +0100
@@ -162,7 +162,7 @@
                 seconds to skip from the start of the stream
         """
         pass
-    
+
     
 
 class BufferAudioSource(AudioSource, Rewindable):
@@ -196,7 +196,6 @@
         self.rewind()
     
     def read(self, size):
-        
         if not self._is_open:
             raise IOError("Stream is not open")
         
@@ -272,12 +271,10 @@
 
 
     def set_time_position(self, time_position): # time in seconds
-        
         position = int(self.sampling_rate * time_position)
         self.set_position(position)
-        
 
-        
+
 
 class WaveAudioSource(AudioSource):
     """
@@ -316,7 +313,6 @@
         
     
     def read(self, size):
-        
         if self._audio_stream is None:
             raise IOError("Stream is not open")
         else:
@@ -366,7 +362,6 @@
             
     
     def read(self, size):
-        
         if self._audio_stream is None:
             raise IOError("Stream is not open")
         
@@ -422,8 +417,6 @@
     def __init__(self, sampling_rate = DEFAULT_SAMPLE_RATE,
                  sample_width = DEFAULT_SAMPLE_WIDTH,
                  channels = DEFAULT_NB_CHANNELS):
-        
-    
         if not sample_width in (1, 2, 4):
             raise ValueError("Sample width must be one of: 1, 2 or 4 (bytes)")
         
@@ -446,7 +439,6 @@
             
         self.stream.stop_stream()
     
-        
     def  stop(self):
         if not self.stream.is_stopped():
             self.stream.stop_stream()
@@ -463,10 +455,9 @@
         
 
 def from_file(filename):
-    
     """
     Create an `AudioSource` object using the audio file specified by `filename`.
-    The appropriate `AudioSource` class is guessed from file's extension.
+    The appropriate :class:`AudioSource` class is guessed from file's extension.
     
     :Parameters:
     
--- a/doc/apitutorial.rst	Sun Mar 06 14:54:52 2016 +0100
+++ b/doc/apitutorial.rst	Sun Mar 06 14:56:06 2016 +0100
@@ -428,7 +428,7 @@
 brief noise that occurs within the leading silence. We certainly do want our tokenizer 
 to stop at this point and considers whatever it comes after as a useful signal.
 To force the tokenizer to ignore that brief event we use two other parameters `init_min`
-ans `init_max_silence`. By `init_min` = 3 and `init_max_silence` = 1 we tell the tokenizer
+and `init_max_silence`. By `init_min` = 3 and `init_max_silence` = 1 we tell the tokenizer
 that a valid event must start with at least 3 noisy windows, between which there
 is at most 1 silent window.
 
--- a/doc/conf.py	Sun Mar 06 14:54:52 2016 +0100
+++ b/doc/conf.py	Sun Mar 06 14:56:06 2016 +0100
@@ -112,19 +112,19 @@
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-#html_theme = 'sphinxdoc'
+html_theme = 'sphinxdoc'
 
 
 # on_rtd is whether we are on readthedocs.org
 import os
 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
 
-
+"""
 if not on_rtd:  # only import and set the theme if we're building docs locally
     import sphinx_rtd_theme
     html_theme = 'sphinx_rtd_theme'
     html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
-
+"""
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the